Add Book to My BookshelfPurchase This Book Online

Appendix B - Pthreads Draft 4 vs. the Final Standard

Pthreads Programming
Bradford Nichols, Dick Buttlar and Jacqueline Proulx Farrell
 Copyright © 1996 O'Reilly & Associates, Inc.

Scheduling
Feature: Draft 4 does not define a way for you to set the scheduling scope of a thread. As a result, the scheduling scope calls (pthread_attr_setscope and pthread_attr_getscope) have no meaning in a Draft 4 implementation. 
Feature: Draft 4 defines a number of symbolic constants (for example, PRI_FIFO_MAX) to represent the maximum and minimum scheduling priorities of threads. These constants have been removed from the final standard. As a result you must call POSIX.1b functions such as sched_get_priority_max to obtain scheduling priority limits. 
Feature: In a Draft 4 implementation, a thread calls the pthread_yield function to surrender the CPU to another runnable thread. In an implementation that conforms to the final standard, a thread calls the thread-specific POSIX.1b function sched_yield
Syntax: In a Draft 4 implementation, you use the pthread_setscheduler and pthread_setprio functions together to dynamically set a thread's scheduling characteristics; in an implementation that conforms to the final standard, you use just one—pthread_setschedparam
Syntax: In a Draft 4 implementation, you use the pthread_attr_setprio and pthread_attr_getprio functions to set and get a thread's scheduling-priority attribute; in an implementation that conforms to the final standard, you use pthread_attr_setschedparam and pthread_attr_getschedparam
Syntax: In a Draft 4 implementation, you use the pthread_attr_setsched and pthread_attr_getsched calls to set and get a thread's scheduling policy; in an implementation that conforms to the final standard, you use the pthread_attr_setschedpolicy and pthread_attr_getschedpolicy calls. 

Previous SectionNext Section
Books24x7.com, Inc © 2000 –  Feedback