pthread_rwlockattr_getpshared(3p) - wariua/manpages-ko GitHub Wiki
μ΄ λ§€λ΄μΌ νμ΄μ§λ POSIX νλ‘κ·Έλλ¨Έ λ§€λ΄μΌμ μΌλΆμ΄λ€. μ΄ μΈν°νμ΄μ€μ 리λ μ€ κ΅¬νμ μ°¨μ΄κ° μμ μ μμΌλ©° (μμΈν 리λ μ€ λμ λ°©μμ ν΄λΉ 리λ μ€ λ§€λ΄μΌ νμ΄μ§ μ°Έκ³ ) 리λ μ€μμ μ΄ μΈν°νμ΄μ€κ° ꡬνλμ΄ μμ§ μμ μλ μλ€.
pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared - μ½κΈ°-μ°κΈ° λ½ μμ± κ°μ²΄μ νλ‘μΈμ€ 곡μ μμ± μ»κΈ° λ° μ€μ νκΈ°
#include <pthread.h>
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t
*restrict attr, int *restrict pshared);
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr,
int pshared);
pthread_rwlockattr_getpshared()
ν¨μλ attr
μ΄ κ°λ¦¬ν€λ μμ± κ°μ²΄λ‘λΆν° process-shared
μμ±μ κ°μ μ»λλ€. pthread_rwlockattr_setpshared()
ν¨μλ attr
μ΄ κ°λ¦¬ν€λ μ΄κΈ°ν λ μμ± κ°μ²΄μ process-shared
μμ±μ μ€μ νλ€.
process-shared
μμ±μ PTHREAD_PROCESS_SHARED
λ‘ μ€μ νλ©΄ μ½κΈ°-μ°κΈ° λ½μ ν λΉν λ©λͺ¨λ¦¬μ μ κ·Ό κ°λ₯ν μ무 μ€λ λλ κ·Έ μ½κΈ°-μ°κΈ° λ½μ μ‘°μν μ μκ² νμ©νλ€. process-shared
μμ±μ΄ PTHREAD_PROCESS_PRIVATE
μ΄λ©΄ μ½κΈ°-μ°κΈ° λ½μ μ΄κΈ°ν ν μ€λ λμ κ°μ νλ‘μΈμ€ λ΄μ μμ±λ μ€λ λλ§ κ·Έ μ½κΈ°-μ°κΈ° λ½μ μ‘°μν μ μλ€. κ·Έλ° μ½κΈ°-μ°κΈ° λ½μ λ€λ₯Έ νλ‘μΈμ€μ μ€λ λκ° μ‘°μνλ €κ³ μλνλ κ²½μ°μ λμ λ°©μμ κ·μ λμ΄ μμ§ μλ€. process-shared
μμ±μ κΈ°λ³Έκ°μ PTHREAD_PROCESS_PRIVATE
μ΄λ€.
μΆκ°μ μΈ μμ±κ³Ό κ·Έ κΈ°λ³Έκ°, κ·Έλ¦¬κ³ μμ± κ°μ μ»κ³ μ€μ νκΈ° μν μ°κ³ ν¨μμ μ΄λ¦μ ꡬνμμ κ·μ νλ€.
pthread_rwlockattr_getpshared()
λ pthread_rwlockattr_setpshared()
μ attr
μΈμλ‘ μ§μ ν κ°μ΄ μ΄κΈ°ν λ μ½κΈ°-μ°κΈ° λ½ μμ± κ°μ²΄λ₯Ό κ°λ¦¬ν€κ³ μμ§ μμ κ²½μ°μ λμ λ°©μμ κ·μ λμ΄ μμ§ μλ€.
μ±κ³΅ μλ£ μ pthread_rwlockattr_getpshared()
ν¨μλ 0μ λ°ννλ©° attr
μ process-shared
μμ±μ pshared
λ§€κ°λ³μκ° κ°λ¦¬ν€λ κ°μ²΄μ μ μ₯νλ€. μλλ©΄ μ€λ₯λ₯Ό λνλ΄λ μ€λ₯ λ²νΈλ₯Ό λ°ννλ€.
μ±κ³΅ μ pthread_rwlockattr_setpshared()
ν¨μλ 0μ λ°ννλ€. μλλ©΄ μ€λ₯λ₯Ό λνλ΄λ μ€λ₯ λ²νΈλ₯Ό λ°ννλ€.
λ€μ κ²½μ°μ pthread_rwlockattr_setpshared()
ν¨μκ° μ€ν¨ν μλ μλ€.
EINVAL
- μμ±μ μ§μ ν μ κ°μ΄ κ·Έ μμ±μ μ λ²ν κ° λ²μλ₯Ό λ²μ΄λλ€.
μ΄ ν¨μλ€μ μ€λ₯ μ½λ [EINTR]
μ λ°ννμ§ μλλ€.
μ΄νλ κ·λ²μ μ΄μ§ μμ λ΄μ©μ΄λ€.
μμ.
μμ.
μμ.
μμ.
pthread_rwlock_destroy(), pthread_rwlockattr_destroy()
POSIX.1-2008 Base Definitions κΆ, <pthread.h>
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.unix.org/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
2013