English 中文(简体)
pthread functions "_np" suffix
原标题:

What does "_np" suffix mean here:

pthread_mutex_timedlock_np

or in macros

PTHREAD_MUTEX_TIMED_NP

Upd:

From glibc2.2

enum 
{ 
  PTHREAD_MUTEX_TIMED_NP, 
  PTHREAD_MUTEX_RECURSIVE_NP, 
  PTHREAD_MUTEX_ERRORCHECK_NP, 
  PTHREAD_MUTEX_ADAPTIVE_NP 
#ifdef __USE_UNIX98 
  , 
  PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, 
  PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, 
  PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, 
  PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL 
#endif 
#ifdef __USE_GNU 
  /* For compatibility. */ 
  , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_ADAPTIVE_NP 
#endif 
};

Does defining __USE_UNIX98 change portability of _NP functions/macro?

最佳回答

Non standard extensions -- i.e., Non Portable. ref (from the Internet Archive)

问题回答

It stands for Non Portable.

That is, it s platform specific extensions to the standard pthreads functions.





相关问题
How do I check if a thread is terminated when using pthread?

How do I check if a thread is terminated? In my case, I have my_pthread[5] and I want to check if any of 5 threads has finished its job (is terminated? - I m not sure) then I can give them more work ...

example of thread specific data in C

Does anybody know of (or can post) an example of the use of thread-specific data? I m looking for something that s clearly explained and easy to understand. I ve got a global char * variable that I m ...

core dump in a multithread program

i was trying to write a simple multithreaded program. It is dumping the core. I have my function that is called when a thread is created below: void *BusyWork(void *t) { int i; int *tid; int ...

uniprocessor or multiprocessor

On unix, how could we know whether the system is multiprocessor or uniprocessor?

Implementing a Priority queue with a Condition Variable in C

My current understanding of condition variables is that all blocked (waiting) threads are inserted into a basic FIFO queue, the first item of which is awakened when signal() is called. Is there any ...

热门标签