2.3 Multiprocessor Enabled/Safe

Both LibC and CLib were written to be thread-safe. Threads calling into these libraries are not funneled (see funneling) to processor zero unless an unsafe subcomponent is used to support the functionality exported by the library. When an unsafe subcomponent is used, the calling thread's safety is ensured by funneling to processor zero without your calling application taking special measures to protect its data or resources. However, this keeps the thread from binding permanently to a nonzero processor, which describes an MP-safe situation.

Although neither library actually does anything to impede multiprocessor enabling, LibC is labeled MP-enabled because it does not consume or need to correct for unsafe subcomponents. CLib is labeled MP-safe because it consumes and corrects for more unsafe subcomponents. To cease consuming these components would result in breaking numerous existing legacy NLM applications.

The only subcomponent consumed by LibC that is not thread-safe is the legacy NetWare file system. However, during installation you can still choose which file system you want to use on a NetWare server. If LibC performs file I/O to a traditional NetWare volume, the thread performing the operation funnels to processor zero for the duration of the call. In addition, Novell Storage Services™ (NSS) on NetWare 5.x and above remains inaccessible in a direct way, and LibC must operate on it through traditional file system calls which funnel. eDirectory™, accessed through LDAP, does not funnel.

Applications written to LibC scale much better than those written to CLib. Applications written to LibC that run on NetWare 6.x scale better than the same LibC applications running on NetWare 5.x.

NKS platform functions return the number of online processors (on multiprocessor hardware) and the identity of the CPU on which the thread is executing.

Calling NXGetCpuID returns the identity of the processor that is executing the calling thread. If the hardware executing the thread has only one processor or only one processor is presently online, the returned value returned is 0 (for processor 0). NXThreadBind provides hard affinity (where a thread is bound on a certain processor) and never executes on any other processor.