Explain the ScheduleWorkToDo Function used in Netware
ScheduleWorkToDo(MyThread Function, arg, workToDo)
The ScheduleWorkToDo ( ) function is specific to NetWare 4.0. This command will place MyThread Function on the work-to-do list of NetWare.Procedures in this list will be executed as work-to-do items, and before threads on the Run List. Any 32-bit argument (arg) may be passed as well as worktodo structure to be used internally by NetWare.
In order for NLMs to make CLIB calls, they must have associated context. Since the procedure (MyThread Function) is executing as an OS callback without CLIB context, additional CLIB function calls may be necessary. The SetThreadContextSpecifier( ) can be used to set proper context of the executing thread and tell NetWare which threads context to assume when making the callback. The discussion of resource ownership and scoping at the end of this chapter has more information about thread context with NetWare.