pthread_mutex_getprioceiling(3p) - wariua/manpages-ko GitHub Wiki

PROLOG

์ด ๋งค๋‰ด์–ผ ํŽ˜์ด์ง€๋Š” POSIX ํ”„๋กœ๊ทธ๋ž˜๋จธ ๋งค๋‰ด์–ผ์˜ ์ผ๋ถ€์ด๋‹ค. ์ด ์ธํ„ฐํŽ˜์ด์Šค์˜ ๋ฆฌ๋ˆ…์Šค ๊ตฌํ˜„์— ์ฐจ์ด๊ฐ€ ์žˆ์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ (์ƒ์„ธํ•œ ๋ฆฌ๋ˆ…์Šค ๋™์ž‘ ๋ฐฉ์‹์€ ํ•ด๋‹น ๋ฆฌ๋ˆ…์Šค ๋งค๋‰ด์–ผ ํŽ˜์ด์ง€ ์ฐธ๊ณ ) ๋ฆฌ๋ˆ…์Šค์—์„œ ์ด ์ธํ„ฐํŽ˜์ด์Šค๊ฐ€ ๊ตฌํ˜„๋˜์–ด ์žˆ์ง€ ์•Š์„ ์ˆ˜๋„ ์žˆ๋‹ค.

NAME

pthread_mutex_getprioceiling, pthread_mutex_setprioceiling - ๋ฎคํ…์Šค์˜ ์šฐ์„ ์ˆœ์œ„ ์ƒํ•œ ์–ป๊ธฐ ๋ฐ ์„ค์ •ํ•˜๊ธฐ (์‹ค์‹œ๊ฐ„ ์Šค๋ ˆ๋“œ)

SYNOPSIS

#include <pthread.h>

int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict mutex,
    int *restrict prioceiling);
int pthread_mutex_setprioceiling(pthread_mutex_t *restrict mutex,
    int prioceiling, int *restrict old_ceiling);

DESCRIPTION

pthread_mutex_getprioceiling() ํ•จ์ˆ˜๋Š” ๋ฎคํ…์Šค์˜ ํ˜„์žฌ ์šฐ์„ ์ˆœ์œ„ ์ƒํ•œ์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

pthread_mutex_setprioceiling() ํ•จ์ˆ˜๋Š” pthread_mutex_lock() ํ˜ธ์ถœ์— ์˜ํ•œ ๊ฒƒ์ฒ˜๋Ÿผ ๋ฎคํ…์Šค๋ฅผ ์ž ๊ทธ๋ ค๊ณ  ํ•˜๋˜ ๋ฎคํ…์Šค๋ฅผ ์ž ๊ทธ๋Š” ๊ณผ์ •์—์„œ ์šฐ์„ ์ˆœ์œ„ ๋ณดํ˜ธ ํ”„๋กœํ† ์ฝœ์„ ์ค€์ˆ˜ํ•  ํ•„์š”๊ฐ€ ์—†๋‹ค. ๋ฎคํ…์Šค๋ฅผ ํš๋“ํ•˜๊ณ  ๋‚˜๋ฉด ๋ฎคํ…์Šค์˜ ์šฐ์„ ์ˆœ์œ„ ์ƒํ•œ์„ ๋ฐ”๊พธ๊ณ ์„œ pthread_mutex_unlock() ํ˜ธ์ถœ์— ์˜ํ•œ ๊ฒƒ์ฒ˜๋Ÿผ ๋ฎคํ…์Šค๋ฅผ ๋†“๋Š”๋‹ค. ๋ณ€๊ฒฝ์— ์„ฑ๊ณตํ•œ ๊ฒฝ์šฐ ์ด์ „ ์šฐ์„ ์ˆœ์œ„ ์ƒํ•œ ๊ฐ’์„ old_ceiling์œผ๋กœ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

pthread_mutex_setprioceiling() ํ•จ์ˆ˜๊ฐ€ ์‹คํŒจํ•˜๋Š” ๊ฒฝ์šฐ ๋ฎคํ…์Šค ์šฐ์„ ์ˆœ์œ„ ์ƒํ•œ์ด ๋ฐ”๋€Œ์ง€ ์•Š๋Š”๋‹ค.

RETURN VALUE

์„ฑ๊ณต ์‹œ pthread_mutex_getprioceiling() ๋ฐ pthread_mutex_setprioceiling() ํ•จ์ˆ˜๋Š” 0์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค. ์•„๋‹ˆ๋ฉด ์˜ค๋ฅ˜๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ์˜ค๋ฅ˜ ๋ฒˆํ˜ธ๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

ERRORS

๋‹ค์Œ ๊ฒฝ์šฐ์— ์ด ํ•จ์ˆ˜๋“ค์ด ์‹คํŒจํ•œ๋‹ค.

EINVAL
mutex์˜ ํ”„๋กœํ† ์ฝœ ์†์„ฑ์ด PTHREAD_PRIO_NONE์ด๋‹ค.
EPERM
๊ตฌํ˜„์—์„œ ์ž‘์—… ์ˆ˜ํ–‰์— ์ ์ ˆํ•œ ํŠน๊ถŒ์„ ์š”๊ตฌํ•˜๋ฉฐ ํ˜ธ์ถœ์ž๊ฐ€ ์ ์ ˆํ•œ ํŠน๊ถŒ์„ ๊ฐ€์ง€๊ณ  ์žˆ์ง€ ์•Š๋‹ค.

๋‹ค์Œ ๊ฒฝ์šฐ์— pthread_mutex_setprioceiling() ํ•จ์ˆ˜๊ฐ€ ์‹คํŒจํ•œ๋‹ค.

EAGAIN
mutex์˜ ์žฌ๊ท€ ๋ฝ ์ตœ๋Œ€ ํšŸ์ˆ˜๋ฅผ ์ดˆ๊ณผํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฎคํ…์Šค๋ฅผ ํš๋“ํ•  ์ˆ˜ ์—†๋‹ค.
EDEADLK
๋ฎคํ…์Šค ์œ ํ˜•์ด PTHREAD_MUTEX_ERRORCHECK์ด๋ฉฐ ํ˜„์žฌ ์Šค๋ ˆ๋“œ๊ฐ€ ์ด๋ฏธ ๊ทธ ๋ฎคํ…์Šค๋ฅผ ์†Œ์œ ํ•˜๊ณ  ์žˆ๋‹ค.
EINVAL
ํ”„๋กœํ† ์ฝœ ์†์„ฑ ๊ฐ’์„ PTHREAD_PRIO_PROTECT๋กœ ํ•ด์„œ ๋ฎคํ…์Šค๋ฅผ ์ƒ์„ฑํ–ˆ์œผ๋ฉฐ ํ˜ธ์ถœ ์Šค๋ ˆ๋“œ์˜ ์šฐ์„ ์ˆœ์œ„๊ฐ€ ๋ฎคํ…์Šค์˜ ํ˜„์žฌ ์šฐ์„ ์ˆœ์œ„ ์ƒํ•œ๋ณด๋‹ค ๋†’์œผ๋ฉฐ ๊ตฌํ˜„์˜ ๋ฎคํ…์Šค ์ž ๊ทธ๊ธฐ ๊ณผ์ •์—์„œ ์šฐ์„ ์ˆœ์œ„ ๋ณดํ˜ธ ํ”„๋กœํ† ์ฝœ์„ ์ค€์ˆ˜ํ•œ๋‹ค.
ENOTRECOVERABLE
๋ฎคํ…์Šค๊ฐ€ ๊ฒฌ๊ณ  ๋ฎคํ…์Šค์ด๋ฉฐ ๋ฎคํ…์Šค๊ฐ€ ๋ณดํ˜ธํ•˜๋Š” ์ƒํƒœ๊ฐ€ ๋ณต๊ตฌ ๊ฐ€๋Šฅํ•˜์ง€ ์•Š๋‹ค.
EOWNERDEAD
๋ฎคํ…์Šค๊ฐ€ ๊ฒฌ๊ณ  ๋ฎคํ…์Šค์ด๋ฉฐ ์ด์ „ ์†Œ์œ ์ž ์Šค๋ ˆ๋“œ๋ฅผ ํฌํ•จํ•œ ํ”„๋กœ์„ธ์Šค๊ฐ€ ๋ฎคํ…์Šค ๋ฝ์„ ์žก์€ ์ฑ„๋กœ ์ข…๋ฃŒํ–ˆ๋‹ค. ํ˜ธ์ถœ ์Šค๋ ˆ๋“œ๊ฐ€ ๋ฎคํ…์Šค ๋ฝ์„ ํš๋“ํ•˜๊ฒŒ ๋˜๋ฉฐ ์ƒํƒœ๋ฅผ ์ •์ƒ์œผ๋กœ ๋งŒ๋“œ๋Š” ๊ฒƒ์€ ์ƒˆ ์†Œ์œ ์ž์˜ ๋ชซ์ด๋‹ค. (pthread_mutex_lock() ์ฐธ๊ณ .)

๋‹ค์Œ ๊ฒฝ์šฐ์— pthread_mutex_setprioceiling() ํ•จ์ˆ˜๊ฐ€ ์‹คํŒจํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

EDEADLK
๊ต์ฐฉ ์กฐ๊ฑด์„ ํƒ์ง€ํ–ˆ๋‹ค.
EINVAL
prioceiling์œผ๋กœ ์š”์ฒญํ•œ ์šฐ์„ ์ˆœ์œ„๊ฐ€ ๋ฒ”์œ„๋ฅผ ๋ฒ—์–ด๋‚œ๋‹ค.
EOWNERDEAD
๋ฎคํ…์Šค๊ฐ€ ๊ฒฌ๊ณ  ๋ฎคํ…์Šค์ด๋ฉฐ ์ด์ „ ์†Œ์œ ์ž ์Šค๋ ˆ๋“œ๊ฐ€ ๋ฎคํ…์Šค ๋ฝ์„ ์žก์€ ์ฑ„๋กœ ์ข…๋ฃŒํ–ˆ๋‹ค. ํ˜ธ์ถœ ์Šค๋ ˆ๋“œ๊ฐ€ ๋ฎคํ…์Šค ๋ฝ์„ ํš๋“ํ•˜๊ฒŒ ๋˜๋ฉฐ ์ƒํƒœ๋ฅผ ์ •์ƒ์œผ๋กœ ๋งŒ๋“œ๋Š” ๊ฒƒ์€ ์ƒˆ ์†Œ์œ ์ž์˜ ๋ชซ์ด๋‹ค. (pthread_mutex_lock() ์ฐธ๊ณ .)

์ด ํ•จ์ˆ˜๋“ค์€ ์˜ค๋ฅ˜ ์ฝ”๋“œ [EINTR]์„ ๋ฐ˜ํ™˜ํ•˜์ง€ ์•Š๋Š”๋‹ค.

์ดํ•˜๋Š” ๊ทœ๋ฒ”์ ์ด์ง€ ์•Š์€ ๋‚ด์šฉ์ด๋‹ค.

EXAMPLES

์—†์Œ.

APPLICATION USAGE

์—†์Œ.

RATIONALE

์—†์Œ.

FUTURE DIRECTIONS

์—†์Œ.

SEE ALSO

pthread_mutex_destroy(), pthread_mutex_lock(), pthread_mutex_timedlock()

POSIX.1-2008 Base Definitions ๊ถŒ, <pthread.h>

COPYRIGHT

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

โš ๏ธ **GitHub.com Fallback** โš ๏ธ