thrd_create(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

thrd_create(3c)

thrd_create(3C)          Standard C Library Functions          thrd_create(3C)

NAME
       thrd_create,    thrd_current,   thrd_detach,   thrd_equal,   thrd_exit,
       thrd_join, thrd_sleep, thrd_yield - C11 thread functions

SYNOPSIS
       #include <threads.h>


       int thrd_create(thrd_t *thr, thrd_start_t func, void *arg);


       thrd_t thrd_current(void);


       int thrd_detach(thrd_t thr);


       int thrd_equal(thrd_t thr0, thrd_t thr1);


       _Noreturn void thrd_exit(int res);


       int thrd_join(thrd_t thr, int *res);


       int thrd_sleep(const struct timespec *duration,
                 struct timespec *remaining);


       void thrd_yield(void);

DESCRIPTION
       The   thrd_create(),   thrd_current(),   thrd_detach(),   thrd_equal(),
       thrd_exit(),  thrd_join(), thrd_sleep(), and thrd_yield() functions are
       part of the threads interfaces as specified in the C11  standard.  With
       the exception of thrd_sleep() and thrd_yield() functions, they are sim‐
       ple  wrappers  over  the  more  general  pthreads  functions.  See  IN‐
       CITS/ISO/IEC 9899:2011.

       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i)  C11  ThreadsPOSIX
       Threads  _ thrd_create()pthread_create() _ thrd_current()pthread_self()
       _   thrd_detach()pthread_detach()   _   thrd_equal()pthread_equal()   _
       thrd_exit()pthread_exit() _ thrd_join()pthread_join()


RETURN VALUES
       Upon  successful  completion,  the  thrd_create(),  thrd_detach(),  and
       thrd_join() functions return thrd_success. If memory  allocation  fails
       for  the requested thread, thrd_create() returns thrd_nomem. Otherwise,
       thrd_create(), thrd_detach(), and thrd_join() return thrd_error to  in‐
       dicate the error.


       The  thrd_current() function returns the thread identifier of the call‐
       ing thread.


       The thrd_equal() function returns a non-zero value if thr0 and thr1 re‐
       fer to the same thread. Otherwise, 0 is returned.


       If the thrd_sleep() function returns because  the  requested  time  has
       elapsed, it's return value is 0. Otherwise if thrd_sleep() has been in‐
       terrupted by a signal or fails, −1 is returned.


       No  value  is  returned  by  either  the  thrd_exit()  function  or the
       thrd_yield() function.

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe


SEE ALSO
       yield(2),    nanosleep(3C),   pthread_create(3C),   pthread_detach(3C),
       pthread_equal(3C),         pthread_exit(3C),          pthread_join(3C),
       pthread_self(3C), threads.h(3HEAD), attributes(7)

Oracle Solaris 11.4               11 Jun 2018                  thrd_create(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3