pthread_condattr_getpshared(3p) - wariua/manpages-ko GitHub Wiki
μ΄ λ§€λ΄μΌ νμ΄μ§λ POSIX νλ‘κ·Έλλ¨Έ λ§€λ΄μΌμ μΌλΆμ΄λ€. μ΄ μΈν°νμ΄μ€μ 리λ μ€ κ΅¬νμ μ°¨μ΄κ° μμ μ μμΌλ©° (μμΈν 리λ μ€ λμ λ°©μμ ν΄λΉ 리λ μ€ λ§€λ΄μΌ νμ΄μ§ μ°Έκ³ ) 리λ μ€μμ μ΄ μΈν°νμ΄μ€κ° ꡬνλμ΄ μμ§ μμ μλ μλ€.
pthread_condattr_getpshared, pthread_condattr_setpshared - νλ‘μΈμ€ 곡μ 쑰건 λ³μ μμ± μ»κΈ° λ° μ€μ νκΈ°
#include <pthread.h>
int pthread_condattr_getpshared(const pthread_condattr_t *restrict attr,
int *restrict pshared);
int pthread_condattr_setpshared(pthread_condattr_t *attr,
int pshared);
pthread_condattr_getpshared()
ν¨μλ attr
μ΄ κ°λ¦¬ν€λ μμ± κ°μ²΄λ‘λΆν° process-shared
μμ±μ κ°μ μ»λλ€.
pthread_condattr_setpshared()
ν¨μλ attr
μ΄ κ°λ¦¬ν€λ μ΄κΈ°ν λ μμ± κ°μ²΄μ process-shared
μμ±μ μ€μ νλ€.
process-shared
μμ±μ PTHREAD_PROCESS_SHARED
λ‘ μ€μ νλ©΄ 쑰건 λ³μλ₯Ό ν λΉν λ©λͺ¨λ¦¬μ μ κ·Ό κ°λ₯ν μ무 μ€λ λλ κ·Έ 쑰건 λ³μλ₯Ό μ‘°μν μ μκ² νμ©νλ©°, μ¬λ¬ νλ‘μΈμ€κ° 곡μ νλ λ©λͺ¨λ¦¬μ 쑰건 λ³μλ₯Ό ν λΉν κ²½μ°μλ λ§μ°¬κ°μ§μ΄λ€. process-shared
μμ±μ΄ PTHREAD_PROCESS_PRIVATE
μ΄λ©΄ 쑰건 λ³μλ₯Ό μ΄κΈ°ν ν μ€λ λμ κ°μ νλ‘μΈμ€ λ΄μ μμ±λ μ€λ λλ§ κ·Έ 쑰건 λ³μλ₯Ό μ‘°μν μ μλ€. κ·Έλ° μ‘°κ±΄ λ³μλ₯Ό λ€λ₯Έ νλ‘μΈμ€μ μ€λ λκ° μ‘°μνλ €κ³ μλνλ κ²½μ°μ λμ λ°©μμ κ·μ λμ΄ μμ§ μλ€. μμ±μ κΈ°λ³Έκ°μ PTHREAD_PROCESS_PRIVATE
μ΄λ€.
pthread_condattr_getpshared()
λ pthread_condattr_setpshared()
μ attr
μΈμλ‘ μ§μ ν κ°μ΄ μ΄κΈ°ν λ 쑰건 λ³μ μμ± κ°μ²΄λ₯Ό κ°λ¦¬ν€κ³ μμ§ μμ κ²½μ°μ λμ λ°©μμ κ·μ λμ΄ μμ§ μλ€.
μ±κ³΅ μ pthread_condattr_setpshared()
ν¨μλ 0μ λ°ννλ€. μλλ©΄ μ€λ₯λ₯Ό λνλ΄λ μ€λ₯ λ²νΈλ₯Ό λ°ννλ€.
μ±κ³΅ μ pthread_condattr_getpshared()
ν¨μλ 0μ λ°ννλ©° attr
μ process-shared
μμ±μ pshared
λ§€κ°λ³μκ° κ°λ¦¬ν€λ κ°μ²΄μ μ μ₯νλ€. μλλ©΄ μ€λ₯λ₯Ό λνλ΄λ μ€λ₯ λ²νΈλ₯Ό λ°ννλ€.
λ€μ κ²½μ°μ pthread_condattr_setpshared()
ν¨μκ° μ€ν¨ν μλ μλ€.
EINVAL
- μμ±μ μ§μ ν μ κ°μ΄ κ·Έ μμ±μ μ λ²ν κ° λ²μλ₯Ό λ²μ΄λλ€.
μ΄ ν¨μλ€μ μ€λ₯ μ½λ [EINTR]
μ λ°ννμ§ μλλ€.
μ΄νλ κ·λ²μ μ΄μ§ μμ λ΄μ©μ΄λ€.
μμ.
μμ.
pthread_condattr_getpshared()
λ pthread_condattr_setpshared()
μ attr
μΈμλ‘ μ§μ ν κ°μ΄ μ΄κΈ°ν λ 쑰건 λ³μ μμ± κ°μ²΄λ₯Ό κ°λ¦¬ν€κ³ μμ§ μμμ ꡬνμμ κ°μ§νλ κ²½μ° ν¨μλ₯Ό μ€ν¨ μ²λ¦¬νκ³ [EINVAL]
μ€λ₯λ₯Ό λ³΄κ³ νκΈ°λ₯Ό κΆμ₯νλ€.
μμ.
pthread_create(), pthread_cond_destroy(), pthread_condattr_destroy(), pthread_mutex_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