Search results

  1. L

    How can I disable local CPU interrupt?

    intr_disable() / intr_restore()
  2. L

    How can I disable local CPU interrupt?

    In Linux, I can use local_irq_save().
  3. L

    Could you recommend the FreeBSD timer mechanism to replace Linux's struct timer_list

    you can use callout. please refer to TIMEOUT(9) You can use callout. Please refer to timeout.
  4. L

    how can I decide whether my code is running in interrupt context or not?

    I know there is in_interrupt() function in linux. Is there such function in FreeBSD kernel space?
  5. L

    sscanf() has bug?

    In my driver, I use sscanf() to create a string. I found the OS crashed. The test code is as following: char buffer2[100] = {1}; buffer2[0] = 1; buffer2[1] = 1; buffer2[2] = 1; buffer2[3] = 1; buffer2[4] = 1; buffer2[5] = 1...
  6. L

    'va_list' undeclared (first use in this function)

    #include <machine/stdarg.h> can work. Thanks doena and everyone.
  7. L

    'va_list' undeclared (first use in this function)

    In my driver, I use 'va_list' type to define variable, but, the compiler reports the following error: 'va_list' undeclared (first use in this function) Which header file should I include? thanks
  8. L

    Does FreeBSD support tasklet or softirq?

    Linux has tasklet, which is realized using softirq. So, does freebsd FreeBSD have such simlar mechanism?
  9. L

    the number of online cpu

    thanks
  10. L

    spin lock in FreeBSD

    I need such a spin lock in FreeBSD, which meets the following three condition: 1 don't sleep. 2 just spins while acquiring a lock. 3 don't disable local CPU interrupts. thanks
  11. L

    spin lock in FreeBSD

    I find mtx_lock_spin() API will disable local CPU interrupts while holding a spin lock. In linux, while acquiring a spin lock, spin_lock_bh() API just spins, doesn't disables local CPU interrupts and never sleeps. Does FreeBSD have such API for spin lock? In other words, I need a spin lock...
  12. L

    get_user_pages

    pin user pages in memory: http://www.kernel.org/doc/htmldocs/kernel-api/API-get-user-pages.html
  13. L

    Does FreeBSD have work item in kernel space?

    thanks I have found "taskqueue" which is simlar with work item. taskqueue
  14. L

    Does FreeBSD have work item in kernel space?

    Hi SirDice, I am looking for the kernel APIs of work item for FreeBSD, such as INIT_WORK(), queue_work(). These kernel APIs are for Linux. thanks.
  15. L

    Does FreeBSD have work item in kernel space?

    I just find a set of work item code for windows NDIS in FreeBSD kernel space. Are there a common implement and kernel APIs for work item? thanks
  16. L

    get_user_pages

    vslock() and bus_dmamap_load_uio() can finish the function of get_user_pages().
  17. L

    Do DMA for userland buffer in kernel space

    I use "ioctl syscall" to pass userland buffer into kernel driver.
  18. L

    Do DMA for userland buffer in kernel space

    I prepare to lock the userland buffer in kernel space and map its address into kernel virtual address. When I get the kernel virtual address, I can call DMA APIs to finish the remaining work. Can my idea work? Are there such kernel APIs, which can lock and map userland buffer in kernel space...
  19. L

    the number of online cpu

    sysctl hw.ncpu? I need a API or method in kernel space. Such as num_online_cpus(), which is a Linux kernel API.
Back
Top