The round_page routine rounds the specified address (or byte count) to a multiple of the page size. For example, round_page would round a 1-byte count to be equal to the size of one page. This routine...
The select_dequeue routine removes the last kernel thread waiting for an event to occur on the specified device. This routine is called to terminate a select call. Typically, a kernel module's xxsele...
The select_dequeue_all routine is similar in functionality to the select_dequeue routine. The difference is that select_dequeue_all removes all kernel threads (not just the last one) while waiting for...
The select_enqueue routine adds the current kernel thread to the list of kernel threads waiting for a select event on the specified device. This routine is called when a kernel module's select routin...
The select_wakeup routine wakes up a kernel thread that is suspended while waiting for an event on the specified device. A user-level process can use the select system call to cause the process to be ...
The sel_queue data structure provides kernel module writers with a generic queue of select events. You must initialize the links member by calling the queue_init routine prior to using the select_enqu...
The simple_lock routine asserts a lock with exclusive access for the resource associated with the specified slock structure pointer. This means that no other kernel thread can gain access to the locke...
The simple_lock_init routine initializes the simple lock structure that you previously declared with the decl_simple_lock_data routine. You need to initialize the simple lock structure only once. Afte...
The simple_lock_terminate routine determines that the kernel module is done using the simple lock permanently. The kernel module must free the simple lock (that is, the kernel module does not hold the...
The simple_lock_try routine tries to assert a lock with read and write access for the resource associated with the specified simple lock. The main difference between this routine and simple_lock is th...
The simple_unlock routine releases a simple lock for the resource associated with the specified simple lock structure pointer. This simple lock was previously asserted by calling the simple_lock or si...
The sleep routine puts a calling process to sleep on the address specified by the channel argument. Some common addresses are the lbolt argument, a buf structure, and a proc structure. This address sh...
The slock data structure is the simple spin lock structure that contains simple lock-specific information. The user of the simple lock method declares a slock data structure by calling the decl_simple...
The operating system supports the naming of spl routines to indicate the associated device types. Named spl routines make it easier to determine which routine you should use to set the priority level ...
The strcmp routine lexicographically compares string s1 to string s2. The routine does not continue the comparison beyond the first null character it finds. A fatal error occurs if you call strcmp wit...