 |
Index for Section 9r |
|
 |
Alphabetical listing for U |
|
 |
Bottom of page |
|
unix_master(9r)
NAME
unix_master - General: Forces execution onto the master CPU
SYNOPSIS
void unix_master(
void );
ARGUMENTS
None
DESCRIPTION
The unix_master routine forces execution of the kernel thread onto the
master CPU (also called the boot CPU). In other words, unix_master binds
the kernel thread to the master CPU. To release the kernel thread from the
bind to the master CPU, call the unix_release routine. You can make
recursive calls to unix_master as long as you make an equal number of calls
to unix_release.
The unix_master routine provides another way besides the simple and complex
lock routines to make a kernel module symmetric multiprocessing (SMP) safe.
Although calling unix_master is not optimal for performance on an SMP CPU,
it does provide third-party kernel module writers with an easy way to make
their modules SMP safe without using the lock routines.
NOTES
Device drivers should not directly call the unix_master and unix_release
routines. One exception to this recommendation is when you want a device
driver's kernel threads to run only on the master CPU. This situation
occurs when your driver creates and starts its own kernel threads and you
set the d_funnel member of the associated dsent structure to the value
DEV_FUNNEL. In this case, each kernel thread must call unix_master once to
ensure that the kernel thread runs only on the master CPU. Remember to make
a corresponding call to unix_release.
CAUTIONS
To avoid deadlock, do not call the unix_master routine under the following
circumstances:
· When holding a simple lock
· In the driver's interrupt service routine
RETURN VALUES
None
SEE ALSO
routines: unix_release(9r)
 |
Index for Section 9r |
|
 |
Alphabetical listing for U |
|
 |
Top of page |
|