EzDoum

찾기
처음으로 | 찾기 | 아카이브 | 글 올리기 | 링크 | 자료실 | 통계 | 연락처 | 자유게시판
이지도움 특집
전체보기
네트워크
TI OMAP35x
TI DaVinci
Analog Blackfin
RobotWar2005
임베디드!
캐쉬의 모든것
메모리 할당 알고리즘
CPU 파이프라이닝
자료구조(Tree)
금융

Login
이름

암호

기억하기


사용자 등록

현재 접속중인 등록 사용자는 0명, 익명 사용자는 1명 입니다.
전체 등록 사용자: 751명

마지막 답장
·libcurl + fuse 조합으로 되는게 많네. (1)
·Linux Ftrace에 관해 (3)
·Android MTP ( Media Transfer Protocol ) (1)
·Lighttpd에 인증을 digest 사용시 IE 오동작 문제? (1)
·Dtrace에 관해 (1)

최근글
·OpenSSL and multi-threads (0)
·ARM 환경에서 OpenCL 사용 (0)
·IoT용 WIFI 모듈 비교 ( MCU ) 클래스 (0)
·Glances - 리눅스 여러 가지 항목을 한 화면에서 모니터링 (0)
·plugin 방식의 로그 분석기 (0)

뜨거운 감자
·나는 인터렉티브한 환경에서 역어셈블 한다. (12)
·GNU REGEX (정규표현식) 프로그래밍 강좌 (7)
·SoCRobotWar 2005 - 신입생 기초 교육자료 (7)
·ASP.NET의 데이터 그리드와 사용자 컨트롤 (7)
·DHTML Editing Control (7)

가장 많이 읽은 글
·[Cache] 2-way Set-Associative 방식이란 무엇일까? (2)
·멀티쓰레드(Pthread) 프로그래밍
·Sorting Algorithm Animation (2)
·GNU REGEX (정규표현식) 프로그래밍 강좌 (7)
·SoCRobotWar 2005 - 신입생 기초 교육자료 (7)

int pthread_rwlock_*
글쓴이: EzDoum 글쓴날: 2007년 02월 12일 오후 04:13
리눅스



pthread 처음 배울 때 보던 책에서 사용자가 직접 구현했어야 했던 부분을 라이브러리단에서 제공한다.
핵심 함수들을 정리해봤다.

reader-writer lock이어서 writer lock 이 굶어죽는 상태를 어찌 처리하나 읽어봐야지.
"Implementations may favor writers over readers to avoid writer  starvation."



PTHREAD_RWLOCK_DESTROY(P)                            PTHREAD_RWLOCK_DESTROY(P)

NAME
       pthread_rwlock_destroy,  pthread_rwlock_init - destroy and initialize a
       read-write lock object

SYNOPSIS
       #include <pthread.h>

       int pthread_rwlock_destroy(pthread_rwlock_t *rwlock);
       int pthread_rwlock_init(pthread_rwlock_t *restrict rwlock,
              const pthread_rwlockattr_t *restrict attr);

DESCRIPTION
       The pthread_rwlock_destroy() function shall destroy the read-write lock
       object referenced by rwlock and release any resources used by the lock.
       The effect of subsequent use of the lock is undefined until the lock is
       reinitialized  by another call to pthread_rwlock_init(). An implementa-
       tion may cause pthread_rwlock_destroy() to set the object referenced by
       rwlock    to    an    invalid   value.   Results   are   undefined   if
       pthread_rwlock_destroy()  is  called  when  any  thread  holds  rwlock.
       Attempting to destroy an uninitialized read-write lock results in unde-
       fined behavior.

       The  pthread_rwlock_init()  function  shall  allocate   any   resources
       required  to  use the read-write lock referenced by rwlock and initial-
       izes the lock to an unlocked state with attributes referenced by  attr.
       If  attr is NULL, the default read-write lock attributes shall be used;
       the effect is the same as passing the address of a  default  read-write
       lock attributes object. Once initialized, the lock can be used any num-
       ber of times without being  reinitialized.  Results  are  undefined  if
       pthread_rwlock_init() is called specifying an already initialized read-
       write lock. Results are undefined if a read-write lock is used  without
       first being initialized.

       If  the  pthread_rwlock_init() function fails, rwlock shall not be ini-
       tialized and the contents of rwlock are undefined.

       Only the object referenced by rwlock may be used  for  performing  syn-
       chronization. The result of referring to copies of that object in calls
       to          pthread_rwlock_destroy(),          pthread_rwlock_rdlock(),
       pthread_rwlock_timedrdlock(),             pthread_rwlock_timedwrlock(),
       pthread_rwlock_tryrdlock(),                 pthread_rwlock_trywrlock(),
       pthread_rwlock_unlock(), or pthread_rwlock_wrlock() is undefined.

RETURN VALUE
       If  successful,  the pthread_rwlock_destroy() and pthread_rwlock_init()
       functions shall return  zero;  otherwise,  an  error  number  shall  be
       returned to indicate the error.

       The  [EBUSY]  and [EINVAL] error checks, if implemented, act as if they
       were performed immediately at the beginning of processing for the func-
       tion  and  caused  an  error return prior to modifying the state of the
       read-write lock specified by rwlock.


ERRORS
       The pthread_rwlock_destroy() function may fail if:

       EBUSY  The implementation has detected an attempt to destroy the object
              referenced by rwlock while it is locked.

       EINVAL The value specified by rwlock is invalid.

       The pthread_rwlock_init() function shall fail if:

       EAGAIN The system lacked the necessary resources (other than memory) to
              initialize another read-write lock.

       ENOMEM Insufficient memory exists to initialize the read-write lock.

       EPERM  The caller does not have the privilege to perform the operation.

       The pthread_rwlock_init() function may fail if:

       EBUSY  The  implementation  has detected an attempt to reinitialize the
              object referenced by rwlock, a previously  initialized  but  not
              yet destroyed read-write lock.

       EINVAL The value specified by attr is invalid.

       These functions shall not return an error code of [EINTR].

       The following sections are informative.

EXAMPLES
       None.

APPLICATION USAGE
       Applications  using  these and related read-write lock functions may be
       subject to priority inversion, as discussed  in  the  Base  Definitions
       volume of IEEE Std 1003.1-2001, Section 3.285, Priority Inversion.

RATIONALE
       None.

FUTURE DIRECTIONS
       None.

SEE ALSO
       pthread_rwlock_rdlock()      ,      pthread_rwlock_timedrdlock()      ,
       pthread_rwlock_timedwrlock()     ,     pthread_rwlock_tryrdlock()     ,
       pthread_rwlock_trywrlock()       ,       pthread_rwlock_unlock()      ,
       pthread_rwlock_wrlock()   ,   the   Base    Definitions    volume    of
       IEEE Std 1003.1-2001, <pthread.h>






PTHREAD_RWLOCK_RDLOCK(P)                              PTHREAD_RWLOCK_RDLOCK(P)

NAME
       pthread_rwlock_rdlock,  pthread_rwlock_tryrdlock  -  lock  a read-write
       lock object for reading

SYNOPSIS
       #include <pthread.h>

       int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock);
       int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock);

DESCRIPTION
       The pthread_rwlock_rdlock() function shall apply a  read  lock  to  the
       read-write  lock  referenced by rwlock. The calling thread acquires the
       read lock if a writer does not hold the lock and there are  no  writers
       blocked on the lock.

       If the Thread Execution Scheduling option is supported, and the threads
       involved in  the  lock  are  executing  with  the  scheduling  policies
       SCHED_FIFO  or  SCHED_RR, the calling thread shall not acquire the lock
       if a writer holds the lock or if writers of higher  or  equal  priority
       are  blocked  on  the lock; otherwise, the calling thread shall acquire
       the lock.

       If the Threads  Execution  Scheduling  option  is  supported,  and  the
       threads  involved  in  the  lock  are executing with the SCHED_SPORADIC
       scheduling policy, the calling thread shall not acquire the lock  if  a
       writer  holds  the  lock  or if writers of higher or equal priority are
       blocked on the lock; otherwise, the calling thread  shall  acquire  the
       lock.

       If  the  Thread  Execution  Scheduling  option  is not supported, it is
       implementation-defined whether the calling  thread  acquires  the  lock
       when  a  writer does not hold the lock and there are writers blocked on
       the lock. If a writer holds the lock,  the  calling  thread  shall  not
       acquire  the  read  lock. If the read lock is not acquired, the calling
       thread shall block until it can acquire the lock.  The  calling  thread
       may deadlock if at the time the call is made it holds a write lock.

       A  thread  may  hold multiple concurrent read locks on rwlock (that is,
       successfully call the pthread_rwlock_rdlock() function n times). If so,
       the  application shall ensure that the thread performs matching unlocks
       (that is, it calls the pthread_rwlock_unlock() function n times).

       The maximum number of simultaneous read locks  that  an  implementation
       guarantees can be applied to a read-write lock shall be implementation-
       defined. The pthread_rwlock_rdlock() function may fail if this  maximum
       would be exceeded.

       The  pthread_rwlock_tryrdlock()  function shall apply a read lock as in
       the pthread_rwlock_rdlock() function, with the exception that the func-
       tion  shall  fail  if the equivalent pthread_rwlock_rdlock() call would
       have   blocked   the   calling   thread.   In   no   case   shall   the
       pthread_rwlock_tryrdlock()   function  ever  block;  it  always  either
       acquires the lock or fails and returns immediately.

       Results are undefined if any of these  functions  are  called  with  an
       uninitialized read-write lock.
       If  a signal is delivered to a thread waiting for a read-write lock for
       reading, upon return from the signal handler the thread resumes waiting
       for the read-write lock for reading as if it was not interrupted.

RETURN VALUE
       If  successful, the pthread_rwlock_rdlock() function shall return zero;
       otherwise, an error number shall be returned to indicate the error.

       The pthread_rwlock_tryrdlock() function shall return zero if  the  lock
       for  reading  on  the  read-write  lock  object referenced by rwlock is
       acquired. Otherwise, an error number shall be returned to indicate  the
       error.

ERRORS
       The pthread_rwlock_tryrdlock() function shall fail if:

       EBUSY  The  read-write lock could not be acquired for reading because a
              writer holds the lock or a writer with the appropriate  priority
              was blocked on it.

       The  pthread_rwlock_rdlock()  and  pthread_rwlock_tryrdlock() functions
       may fail if:

       EINVAL The value specified by rwlock does not refer to  an  initialized
              read-write lock object.

       EAGAIN The  read  lock could not be acquired because the maximum number
              of read locks for rwlock has been exceeded.

       The pthread_rwlock_rdlock() function may fail if:

       EDEADLK
              The current thread already owns the read-write lock for writing.

       These functions shall not return an error code of [EINTR].

       The following sections are informative.

EXAMPLES
       None.

APPLICATION USAGE
       Applications  using  these  functions may be subject to priority inver-
       sion,   as   discussed   in   the   Base    Definitions    volume    of
       IEEE Std 1003.1-2001, Section 3.285, Priority Inversion.




PTHREAD_RWLOCK_TRYWRLOCK(P)                        PTHREAD_RWLOCK_TRYWRLOCK(P)

NAME
       pthread_rwlock_trywrlock,  pthread_rwlock_wrlock  -  lock  a read-write
       lock object for writing

SYNOPSIS
       #include <pthread.h>

       int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock);
       int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock);

DESCRIPTION
       The pthread_rwlock_trywrlock() function shall apply a write  lock  like
       the pthread_rwlock_wrlock() function, with the exception that the func-
       tion shall fail if any thread currently holds rwlock  (for  reading  or
       writing).

       The  pthread_rwlock_wrlock()  function  shall apply a write lock to the
       read-write lock referenced by rwlock. The calling thread  acquires  the
       write  lock  if no other thread (reader or writer) holds the read-write
       lock rwlock. Otherwise, the thread shall block until it can acquire the
       lock.  The  calling thread may deadlock if at the time the call is made
       it holds the read-write lock (whether a read or write lock).

       Implementations may favor writers over readers to avoid writer  starva-
       tion.

       Results  are  undefined  if  any  of these functions are called with an
       uninitialized read-write lock.

       If a signal is delivered to a thread waiting for a read-write lock  for
       writing, upon return from the signal handler the thread resumes waiting
       for the read-write lock for writing as if it was not interrupted.

RETURN VALUE
       The pthread_rwlock_trywrlock() function shall return zero if  the  lock
       for  writing  on  the  read-write  lock  object referenced by rwlock is
       acquired. Otherwise, an error number shall be returned to indicate  the
       error.

       If  successful, the pthread_rwlock_wrlock() function shall return zero;
       otherwise, an error number shall be returned to indicate the error.

ERRORS
       The pthread_rwlock_trywrlock() function shall fail if:

       EBUSY  The read-write lock could not be acquired for writing because it
              was already locked for reading or writing.

       The  pthread_rwlock_trywrlock()  and  pthread_rwlock_wrlock() functions
       may fail if:

       EINVAL The value specified by rwlock does not refer to  an  initialized
              read-write lock object.

       The pthread_rwlock_wrlock() function may fail if:

       EDEADLK

              The  current thread already owns the read-write lock for writing
              or reading.

       These functions shall not return an error code of [EINTR].

       The following sections are informative.

EXAMPLES
       None.

APPLICATION USAGE
       Applications using these functions may be subject  to  priority  inver-
       sion,    as    discussed    in   the   Base   Definitions   volume   of
       IEEE Std 1003.1-2001, Section 3.285, Priority Inversion.

RATIONALE
       None.

FUTURE DIRECTIONS
       None.



PTHREAD_RWLOCK_UNLOCK(P)                              PTHREAD_RWLOCK_UNLOCK(P)

NAME
       pthread_rwlock_unlock - unlock a read-write lock object

SYNOPSIS
       #include <pthread.h>

       int pthread_rwlock_unlock(pthread_rwlock_t *rwlock);

DESCRIPTION
       The  pthread_rwlock_unlock()  function shall release a lock held on the
       read-write lock object referenced by rwlock.  Results are undefined  if
       the read-write lock rwlock is not held by the calling thread.

       If  this  function is called to release a read lock from the read-write
       lock object and there are other read locks currently held on this read-
       write  lock  object,  the  read-write  lock  object remains in the read
       locked state. If this function releases the last  read  lock  for  this
       read-write  lock object, the read-write lock object shall be put in the
       unlocked state with no owners.

       If this function is called to release a write lock for this  read-write
       lock  object,  the  read-write lock object shall be put in the unlocked
       state.

       If there are threads blocked on the lock when it becomes available, the
       scheduling  policy  shall  determine  which thread(s) shall acquire the
       lock.    If the Thread Execution Scheduling option is  supported,  when
       threads executing with the scheduling policies SCHED_FIFO, SCHED_RR, or
       SCHED_SPORADIC are waiting on the lock, they shall acquire the lock  in
       priority  order  when  the  lock  becomes available. For equal priority
       threads, write locks shall take precedence over  read  locks.   If  the
       Thread  Execution Scheduling option is not supported, it is implementa-
       tion-defined whether write locks take precedence over read locks.

       Results are undefined if any of these  functions  are  called  with  an
       uninitialized read-write lock.

RETURN VALUE
       If  successful, the pthread_rwlock_unlock() function shall return zero;
       otherwise, an error number shall be returned to indicate the error.

ERRORS
       The pthread_rwlock_unlock() function may fail if:

       EINVAL The value specified by rwlock does not refer to  an  initialized
              read-write lock object.

       EPERM  The  current thread does not hold a lock on the read-write lock.

       The pthread_rwlock_unlock() function shall not return an error code  of
       [EINTR].

       The following sections are informative.

EXAMPLES
       None.
       
APPLICATION USAGE
       None.

RATIONALE
       None.

FUTURE DIRECTIONS
       None.




PTHREAD_RWLOCK_TIMEDRDLOCK(P)                    PTHREAD_RWLOCK_TIMEDRDLOCK(P)

NAME
       pthread_rwlock_timedrdlock - lock a read-write lock for reading

SYNOPSIS
       #include <pthread.h>
       #include <time.h>

       int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict rwlock,
              const struct timespec *restrict abs_timeout);

DESCRIPTION
       The  pthread_rwlock_timedrdlock()  function  shall apply a read lock to
       the   read-write   lock   referenced    by    rwlock    as    in    the
       pthread_rwlock_rdlock()  function.  However,  if  the  lock  cannot  be
       acquired without waiting for other threads to  unlock  the  lock,  this
       wait shall be terminated when the specified timeout expires.  The time-
       out shall expire  when  the  absolute  time  specified  by  abs_timeout
       passes,  as measured by the clock on which timeouts are based (that is,
       when the value of that clock equals or exceeds abs_timeout), or if  the
       absolute  time  specified by abs_timeout has already been passed at the
       time of the call.

       If the Timers option is supported, the timeout shall be  based  on  the
       CLOCK_REALTIME clock.  If the Timers option is not supported, the time-
       out shall be based on the system clock as returned by the time()  func-
       tion.  The  resolution  of  the  timeout shall be the resolution of the
       clock on which it is based. The timespec data type is  defined  in  the
       <time.h>  header. Under no circumstances shall the function fail with a
       timeout if the lock can be acquired immediately. The  validity  of  the
       abs_timeout  parameter  need  not be checked if the lock can be immedi-
       ately acquired.

       If a signal that causes a signal handler to be executed is delivered to
       a   thread   blocked   on   a   read-write   lock   via   a   call   to
       pthread_rwlock_timedrdlock(), upon return from the signal  handler  the
       thread  shall resume waiting for the lock as if it was not interrupted.

       The calling thread may deadlock if at the time  the  call  is  made  it
       holds  a  write lock on rwlock. The results are undefined if this func-
       tion is called with an uninitialized read-write lock.

RETURN VALUE
       The pthread_rwlock_timedrdlock() function shall return zero if the lock
       for  reading  on  the  read-write  lock  object referenced by rwlock is
       acquired. Otherwise, an error number shall be returned to indicate  the
       error.



ERRORS
       The pthread_rwlock_timedrdlock() function shall fail if:

       ETIMEDOUT
              The  lock  could  not  be  acquired before the specified timeout
              expired.

       The pthread_rwlock_timedrdlock() function may fail if:

       EAGAIN The read lock could not be acquired because the  maximum  number
              of read locks for lock would be exceeded.

       EDEADLK
              The calling thread already holds a write lock on rwlock.

       EINVAL The  value  specified by rwlock does not refer to an initialized
              read-write lock object, or the abs_timeout nanosecond  value  is
              less than zero or greater than or equal to 1000 million.

       This function shall not return an error code of [EINTR].

       The following sections are informative.

EXAMPLES
       None.

APPLICATION USAGE
       Applications  using this function may be subject to priority inversion,
       as discussed in the Base Definitions  volume  of  IEEE Std 1003.1-2001,
       Section 3.285, Priority Inversion.

       The  pthread_rwlock_timedrdlock()  function  is part of the Threads and
       Timeouts options and need not be provided on all implementations.

RATIONALE
       None.

FUTURE DIRECTIONS
       None.




PTHREAD_RWLOCK_TIMEDWRLOCK(P)                    PTHREAD_RWLOCK_TIMEDWRLOCK(P)

NAME
       pthread_rwlock_timedwrlock - lock a read-write lock for writing

SYNOPSIS
       #include <pthread.h>
       #include <time.h>

       int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict rwlock,
              const struct timespec *restrict abs_timeout);

DESCRIPTION
       The  pthread_rwlock_timedwrlock()  function shall apply a write lock to
       the   read-write   lock   referenced    by    rwlock    as    in    the
       pthread_rwlock_wrlock()  function.  However,  if  the  lock  cannot  be
       acquired without waiting for other threads to  unlock  the  lock,  this
       wait shall be terminated when the specified timeout expires.  The time-
       out shall expire  when  the  absolute  time  specified  by  abs_timeout
       passes,  as measured by the clock on which timeouts are based (that is,
       when the value of that clock equals or exceeds abs_timeout), or if  the
       absolute  time  specified by abs_timeout has already been passed at the
       time of the call.

       If the Timers option is supported, the timeout shall be  based  on  the
       CLOCK_REALTIME clock.  If the Timers option is not supported, the time-
       out shall be based on the system clock as returned by the time()  func-
       tion.  The  resolution  of  the  timeout shall be the resolution of the
       clock on which it is based. The timespec data type is  defined  in  the
       <time.h>  header. Under no circumstances shall the function fail with a
       timeout if the lock can be acquired immediately. The  validity  of  the
       abs_timeout  parameter  need  not be checked if the lock can be immedi-
       ately acquired.

       If a signal that causes a signal handler to be executed is delivered to
       a   thread   blocked   on   a   read-write   lock   via   a   call   to
       pthread_rwlock_timedwrlock(), upon return from the signal  handler  the
       thread  shall resume waiting for the lock as if it was not interrupted.

       The calling thread may deadlock if at the time  the  call  is  made  it
       holds  the  read-write lock. The results are undefined if this function
       is called with an uninitialized read-write lock.

RETURN VALUE
       The pthread_rwlock_timedwrlock() function shall return zero if the lock
       for  writing  on  the  read-write  lock  object referenced by rwlock is
       acquired. Otherwise, an error number shall be returned to indicate  the
       error.

ERRORS
       The pthread_rwlock_timedwrlock() function shall fail if:

       ETIMEDOUT
              The  lock  could  not  be  acquired before the specified timeout
              expired.

       The pthread_rwlock_timedwrlock() function may fail if:

       EDEADLK
              The calling thread already holds the rwlock.

       EINVAL The value specified by rwlock does not refer to  an  initialized
              read-write  lock  object, or the abs_timeout nanosecond value is
              less than zero or greater than or equal to 1000 million.

       This function shall not return an error code of [EINTR].

       The following sections are informative.

EXAMPLES
       None.

APPLICATION USAGE
       Applications using this function may be subject to priority  inversion,
       as  discussed  in  the Base Definitions volume of IEEE Std 1003.1-2001,
       Section 3.285, Priority Inversion.

       The pthread_rwlock_timedwrlock() function is part of  the  Threads  and
       Timeouts options and need not be provided on all implementations.

RATIONALE
       None.

FUTURE DIRECTIONS
       None.


[분류: 리눅스 인쇄용 페이지 본문 email로 보내기 ]

<  프로그래머는0 (으)로부터 센다. | 강한 지름신 내림!! 칼라잉크젯 복합기, 무한리필 시스템  >
int pthread_rwlock_* | 답장: 5개 | 본문에 답장
정렬 :  
답장 EzDoum 2007년 02월 12일 오후 04:25 [ 이글에 답장 | 본문에 답장 | 책갈피 ]
General Programming Concepts: Writing and Debugging Programs
Using Read Write Locks

http://moka.ccr.jussieu.fr/doc_link/en_US/a_doc_lib/aixprggd/genprogc/rwlocks.htm#rwlocks


[수정]

답장 EzDoum 2007년 02월 15일 오전 11:14 [ 이글에 답장 | 본문에 답장 | 책갈피 ]
confstr(3) - Linux man page
NAME
confstr - get configuration dependent string variables


SYNOPSIS
#define _POSIX_C_SOURCE 2
or
#define _XOPEN_SOURCE

#include <unistd.h>

size_t confstr(int name, char *buf, size_t len);


DESCRIPTION
confstr() gets the value of configuration-dependent string variables.
The name argument is the system variable to be queried. The following variables are supported:

_CS_GNU_LIBC_VERSION (GNU C library only; since glibc 2.3.2)
A string which identifies the GNU C library version on this system (e.g, "glibc 2.3.4").
_CS_GNU_LIBPTHREAD_VERSION (GNU C library only; since glibc 2.3.2)
A string which identifies the POSIX implementation supplied by this C library (e.g, "NPTL 2.3.4" or "linuxthreads-0.10").
_CS_PATH
A value for the PATH variable which indicates where all the POSIX.2 standard utilities can be found.
If buf is not NULL and len is not zero, confstr() copies the value of the string to buf truncated to len - 1 characters if necessary, with a null byte ('\0') as terminator. This can be detected by comparing the return value of confstr() against len.

If len is zero and buf is NULL, confstr() just returns the value as defined below.

RETURN VALUE
If name is a valid configuration variable, confstr() returns the number of bytes (including the terminating null byte) that would be required to hold the entire value of that variable. This value may be greater than len, which means that the value in buf is truncated.
If name is a valid configuration variable, but that variable does not have a value, then confstr() returns 0. If name does not correspond to a valid configuration variable, confstr() returns 0, and errno is set to EINVAL.

ERRORS
EINVAL
If the value of name is invalid.
EXAMPLE
The following code fragment determines the path where to find the POSIX.2 system utilities:
char *pathbuf; size_t n;

n = confstr(_CS_PATH,NULL,(size_t)0);
if ((pathbuf = malloc(n)) == NULL) abort();
confstr(_CS_PATH, pathbuf, n);
[수정]

답장 EzDoum 2007년 02월 15일 오전 11:25 [ 이글에 답장 | 본문에 답장 | 책갈피 ]
http://linuxdevices.com/articles/AT6753699732.html


Simply using a 2.6 based kernel does not mean that you are automatically using the NPTL. To determine the threading library that a system uses, you can execute the getconf command (part of the glibc package), to examine the GNU_LIBPTHREAD_VERSION environment variable, as in the following command example:

# getconf GNU_LIBPTHREAD_VERSION
linuxthreads-0.10

If your system uses the NPTL, the command would return the value of NPTL that your system was using, as in the following example:

# getconf GNU_LIBPTHREAD_VERSION
nptl-0.60


[수정]

답장 EzDoum 2007년 02월 15일 오후 12:22 [ 이글에 답장 | 본문에 답장 | 책갈피 ]
NPTL 자료
http://en.wikipedia.org/wiki/Native_POSIX_Thread_Library
http://www-128.ibm.com/developerworks/linux/library/l-threading.html?ca=dgr-lnxw07LinuxThreadsAndNPTL

nptl에서 signal 처리에 대한 예제( SIGALRM 사용 )
http://nptl.bullopensource.org/ml_nptl/nptl-200508/msg00006.html
[수정]

답장 EzDoum 2007년 02월 15일 오후 01:25 [ 이글에 답장 | 본문에 답장 | 책갈피 ]
CVS log for src/lib/libpthread/pthread_rwlock.c
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libpthread/pthread_rwlock.c
[수정]

int pthread_rwlock_* | 답장: 5개 | 본문에 답장
정렬 :  

답장 쓰기
글을 올리시려면 로그인 (사용자 등록) 하셔야 합니다.

검색
Google

분류
·공지 (6)
·인터넷 (87)
·하드웨어 (260)
·C/C++ (65)
·어셈블리 (7)
·리눅스 (136)
·리눅스 커널 (67)
·윈도우즈 (25)
·데이터베이스 (20)
·보안 (16)
·.NET (25)
·그래픽 (13)
·책소개 (42)
·호기심 천국 (80)
·잡담 (111)
·사랑 (3)

전체 본문수: 963
전체 답장수: 525


분류 : 리눅스
최근글
최근글
가장 많이 읽은 글
·멀티쓰레드(Pthread) 프로그래밍 (0)
뜨거운 감자
·GNU REGEX (정규표현식) 프로그래밍 강좌 (7)

EzDoum투표
이지도움 어때요?
이게 뭐야. 다시 안올란다. --;
아이 좋아라~ +_+;
관심없다.
먼가는 있는거 같은데 뭐하는 곳이지?
기타 (자유게시판에 글로 남겨 주세요)
[ 결과 | 투표 ]

랜덤 링크
http://kldp.net


 Home ^ BACK TO TOP ^ EzDoum - 도움이 필요하세요~??
 Powered by KorWeblog 1.5.8 Copyleft © 2001 EzDoum, 관리자: EzDoum