Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
404 views
in Technique[技术] by (71.8m points)

posix - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...