Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include
File: pthread.h
/* Copyright (C) 2002-2018 Free Software Foundation, Inc.
[0] Fix | Delete
This file is part of the GNU C Library.
[1] Fix | Delete
[2] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[3] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[4] Fix | Delete
License as published by the Free Software Foundation; either
[5] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[6] Fix | Delete
[7] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[8] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[9] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[10] Fix | Delete
Lesser General Public License for more details.
[11] Fix | Delete
[12] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[13] Fix | Delete
License along with the GNU C Library; if not, see
[14] Fix | Delete
<http://www.gnu.org/licenses/>. */
[15] Fix | Delete
[16] Fix | Delete
#ifndef _PTHREAD_H
[17] Fix | Delete
#define _PTHREAD_H 1
[18] Fix | Delete
[19] Fix | Delete
#include <features.h>
[20] Fix | Delete
#include <endian.h>
[21] Fix | Delete
#include <sched.h>
[22] Fix | Delete
#include <time.h>
[23] Fix | Delete
[24] Fix | Delete
#include <bits/pthreadtypes.h>
[25] Fix | Delete
#include <bits/setjmp.h>
[26] Fix | Delete
#include <bits/wordsize.h>
[27] Fix | Delete
#include <bits/types/struct_timespec.h>
[28] Fix | Delete
[29] Fix | Delete
[30] Fix | Delete
/* Detach state. */
[31] Fix | Delete
enum
[32] Fix | Delete
{
[33] Fix | Delete
PTHREAD_CREATE_JOINABLE,
[34] Fix | Delete
#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
[35] Fix | Delete
PTHREAD_CREATE_DETACHED
[36] Fix | Delete
#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
[37] Fix | Delete
};
[38] Fix | Delete
[39] Fix | Delete
[40] Fix | Delete
/* Mutex types. */
[41] Fix | Delete
enum
[42] Fix | Delete
{
[43] Fix | Delete
PTHREAD_MUTEX_TIMED_NP,
[44] Fix | Delete
PTHREAD_MUTEX_RECURSIVE_NP,
[45] Fix | Delete
PTHREAD_MUTEX_ERRORCHECK_NP,
[46] Fix | Delete
PTHREAD_MUTEX_ADAPTIVE_NP
[47] Fix | Delete
#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
[48] Fix | Delete
,
[49] Fix | Delete
PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
[50] Fix | Delete
PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
[51] Fix | Delete
PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
[52] Fix | Delete
PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
[53] Fix | Delete
#endif
[54] Fix | Delete
#ifdef __USE_GNU
[55] Fix | Delete
/* For compatibility. */
[56] Fix | Delete
, PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
[57] Fix | Delete
#endif
[58] Fix | Delete
};
[59] Fix | Delete
[60] Fix | Delete
[61] Fix | Delete
#ifdef __USE_XOPEN2K
[62] Fix | Delete
/* Robust mutex or not flags. */
[63] Fix | Delete
enum
[64] Fix | Delete
{
[65] Fix | Delete
PTHREAD_MUTEX_STALLED,
[66] Fix | Delete
PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
[67] Fix | Delete
PTHREAD_MUTEX_ROBUST,
[68] Fix | Delete
PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
[69] Fix | Delete
};
[70] Fix | Delete
#endif
[71] Fix | Delete
[72] Fix | Delete
[73] Fix | Delete
#if defined __USE_POSIX199506 || defined __USE_UNIX98
[74] Fix | Delete
/* Mutex protocols. */
[75] Fix | Delete
enum
[76] Fix | Delete
{
[77] Fix | Delete
PTHREAD_PRIO_NONE,
[78] Fix | Delete
PTHREAD_PRIO_INHERIT,
[79] Fix | Delete
PTHREAD_PRIO_PROTECT
[80] Fix | Delete
};
[81] Fix | Delete
#endif
[82] Fix | Delete
[83] Fix | Delete
[84] Fix | Delete
#if __PTHREAD_MUTEX_HAVE_PREV
[85] Fix | Delete
# define PTHREAD_MUTEX_INITIALIZER \
[86] Fix | Delete
{ { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
[87] Fix | Delete
# ifdef __USE_GNU
[88] Fix | Delete
# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
[89] Fix | Delete
{ { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
[90] Fix | Delete
# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
[91] Fix | Delete
{ { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __PTHREAD_SPINS, { 0, 0 } } }
[92] Fix | Delete
# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
[93] Fix | Delete
{ { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
[94] Fix | Delete
[95] Fix | Delete
# endif
[96] Fix | Delete
#else
[97] Fix | Delete
# define PTHREAD_MUTEX_INITIALIZER \
[98] Fix | Delete
{ { 0, 0, 0, 0, 0, { __PTHREAD_SPINS } } }
[99] Fix | Delete
# ifdef __USE_GNU
[100] Fix | Delete
# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
[101] Fix | Delete
{ { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { __PTHREAD_SPINS } } }
[102] Fix | Delete
# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
[103] Fix | Delete
{ { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { __PTHREAD_SPINS } } }
[104] Fix | Delete
# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
[105] Fix | Delete
{ { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { __PTHREAD_SPINS } } }
[106] Fix | Delete
[107] Fix | Delete
# endif
[108] Fix | Delete
#endif
[109] Fix | Delete
[110] Fix | Delete
[111] Fix | Delete
/* Read-write lock types. */
[112] Fix | Delete
#if defined __USE_UNIX98 || defined __USE_XOPEN2K
[113] Fix | Delete
enum
[114] Fix | Delete
{
[115] Fix | Delete
PTHREAD_RWLOCK_PREFER_READER_NP,
[116] Fix | Delete
PTHREAD_RWLOCK_PREFER_WRITER_NP,
[117] Fix | Delete
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
[118] Fix | Delete
PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
[119] Fix | Delete
};
[120] Fix | Delete
[121] Fix | Delete
/* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t
[122] Fix | Delete
has the shared field. All 64-bit architectures have the shared field
[123] Fix | Delete
in pthread_rwlock_t. */
[124] Fix | Delete
#ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
[125] Fix | Delete
# if __WORDSIZE == 64
[126] Fix | Delete
# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
[127] Fix | Delete
# endif
[128] Fix | Delete
#endif
[129] Fix | Delete
[130] Fix | Delete
/* Read-write lock initializers. */
[131] Fix | Delete
# define PTHREAD_RWLOCK_INITIALIZER \
[132] Fix | Delete
{ { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
[133] Fix | Delete
# ifdef __USE_GNU
[134] Fix | Delete
# ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
[135] Fix | Delete
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
[136] Fix | Delete
{ { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, \
[137] Fix | Delete
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
[138] Fix | Delete
# else
[139] Fix | Delete
# if __BYTE_ORDER == __LITTLE_ENDIAN
[140] Fix | Delete
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
[141] Fix | Delete
{ { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \
[142] Fix | Delete
0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
[143] Fix | Delete
# else
[144] Fix | Delete
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
[145] Fix | Delete
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\
[146] Fix | Delete
0 } }
[147] Fix | Delete
# endif
[148] Fix | Delete
# endif
[149] Fix | Delete
# endif
[150] Fix | Delete
#endif /* Unix98 or XOpen2K */
[151] Fix | Delete
[152] Fix | Delete
[153] Fix | Delete
/* Scheduler inheritance. */
[154] Fix | Delete
enum
[155] Fix | Delete
{
[156] Fix | Delete
PTHREAD_INHERIT_SCHED,
[157] Fix | Delete
#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED
[158] Fix | Delete
PTHREAD_EXPLICIT_SCHED
[159] Fix | Delete
#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED
[160] Fix | Delete
};
[161] Fix | Delete
[162] Fix | Delete
[163] Fix | Delete
/* Scope handling. */
[164] Fix | Delete
enum
[165] Fix | Delete
{
[166] Fix | Delete
PTHREAD_SCOPE_SYSTEM,
[167] Fix | Delete
#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
[168] Fix | Delete
PTHREAD_SCOPE_PROCESS
[169] Fix | Delete
#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
[170] Fix | Delete
};
[171] Fix | Delete
[172] Fix | Delete
[173] Fix | Delete
/* Process shared or private flag. */
[174] Fix | Delete
enum
[175] Fix | Delete
{
[176] Fix | Delete
PTHREAD_PROCESS_PRIVATE,
[177] Fix | Delete
#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE
[178] Fix | Delete
PTHREAD_PROCESS_SHARED
[179] Fix | Delete
#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED
[180] Fix | Delete
};
[181] Fix | Delete
[182] Fix | Delete
[183] Fix | Delete
[184] Fix | Delete
/* Conditional variable handling. */
[185] Fix | Delete
#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }
[186] Fix | Delete
[187] Fix | Delete
[188] Fix | Delete
/* Cleanup buffers */
[189] Fix | Delete
struct _pthread_cleanup_buffer
[190] Fix | Delete
{
[191] Fix | Delete
void (*__routine) (void *); /* Function to call. */
[192] Fix | Delete
void *__arg; /* Its argument. */
[193] Fix | Delete
int __canceltype; /* Saved cancellation type. */
[194] Fix | Delete
struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */
[195] Fix | Delete
};
[196] Fix | Delete
[197] Fix | Delete
/* Cancellation */
[198] Fix | Delete
enum
[199] Fix | Delete
{
[200] Fix | Delete
PTHREAD_CANCEL_ENABLE,
[201] Fix | Delete
#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
[202] Fix | Delete
PTHREAD_CANCEL_DISABLE
[203] Fix | Delete
#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
[204] Fix | Delete
};
[205] Fix | Delete
enum
[206] Fix | Delete
{
[207] Fix | Delete
PTHREAD_CANCEL_DEFERRED,
[208] Fix | Delete
#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
[209] Fix | Delete
PTHREAD_CANCEL_ASYNCHRONOUS
[210] Fix | Delete
#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
[211] Fix | Delete
};
[212] Fix | Delete
#define PTHREAD_CANCELED ((void *) -1)
[213] Fix | Delete
[214] Fix | Delete
[215] Fix | Delete
/* Single execution handling. */
[216] Fix | Delete
#define PTHREAD_ONCE_INIT 0
[217] Fix | Delete
[218] Fix | Delete
[219] Fix | Delete
#ifdef __USE_XOPEN2K
[220] Fix | Delete
/* Value returned by 'pthread_barrier_wait' for one of the threads after
[221] Fix | Delete
the required number of threads have called this function.
[222] Fix | Delete
-1 is distinct from 0 and all errno constants */
[223] Fix | Delete
# define PTHREAD_BARRIER_SERIAL_THREAD -1
[224] Fix | Delete
#endif
[225] Fix | Delete
[226] Fix | Delete
[227] Fix | Delete
__BEGIN_DECLS
[228] Fix | Delete
[229] Fix | Delete
/* Create a new thread, starting with execution of START-ROUTINE
[230] Fix | Delete
getting passed ARG. Creation attributed come from ATTR. The new
[231] Fix | Delete
handle is stored in *NEWTHREAD. */
[232] Fix | Delete
extern int pthread_create (pthread_t *__restrict __newthread,
[233] Fix | Delete
const pthread_attr_t *__restrict __attr,
[234] Fix | Delete
void *(*__start_routine) (void *),
[235] Fix | Delete
void *__restrict __arg) __THROWNL __nonnull ((1, 3));
[236] Fix | Delete
[237] Fix | Delete
/* Terminate calling thread.
[238] Fix | Delete
[239] Fix | Delete
The registered cleanup handlers are called via exception handling
[240] Fix | Delete
so we cannot mark this function with __THROW.*/
[241] Fix | Delete
extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
[242] Fix | Delete
[243] Fix | Delete
/* Make calling thread wait for termination of the thread TH. The
[244] Fix | Delete
exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN
[245] Fix | Delete
is not NULL.
[246] Fix | Delete
[247] Fix | Delete
This function is a cancellation point and therefore not marked with
[248] Fix | Delete
__THROW. */
[249] Fix | Delete
extern int pthread_join (pthread_t __th, void **__thread_return);
[250] Fix | Delete
[251] Fix | Delete
#ifdef __USE_GNU
[252] Fix | Delete
/* Check whether thread TH has terminated. If yes return the status of
[253] Fix | Delete
the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */
[254] Fix | Delete
extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
[255] Fix | Delete
[256] Fix | Delete
/* Make calling thread wait for termination of the thread TH, but only
[257] Fix | Delete
until TIMEOUT. The exit status of the thread is stored in
[258] Fix | Delete
*THREAD_RETURN, if THREAD_RETURN is not NULL.
[259] Fix | Delete
[260] Fix | Delete
This function is a cancellation point and therefore not marked with
[261] Fix | Delete
__THROW. */
[262] Fix | Delete
extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
[263] Fix | Delete
const struct timespec *__abstime);
[264] Fix | Delete
#endif
[265] Fix | Delete
[266] Fix | Delete
/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
[267] Fix | Delete
The resources of TH will therefore be freed immediately when it
[268] Fix | Delete
terminates, instead of waiting for another thread to perform PTHREAD_JOIN
[269] Fix | Delete
on it. */
[270] Fix | Delete
extern int pthread_detach (pthread_t __th) __THROW;
[271] Fix | Delete
[272] Fix | Delete
[273] Fix | Delete
/* Obtain the identifier of the current thread. */
[274] Fix | Delete
extern pthread_t pthread_self (void) __THROW __attribute__ ((__const__));
[275] Fix | Delete
[276] Fix | Delete
/* Compare two thread identifiers. */
[277] Fix | Delete
extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
[278] Fix | Delete
__THROW __attribute__ ((__const__));
[279] Fix | Delete
[280] Fix | Delete
[281] Fix | Delete
/* Thread attribute handling. */
[282] Fix | Delete
[283] Fix | Delete
/* Initialize thread attribute *ATTR with default attributes
[284] Fix | Delete
(detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER,
[285] Fix | Delete
no user-provided stack). */
[286] Fix | Delete
extern int pthread_attr_init (pthread_attr_t *__attr) __THROW __nonnull ((1));
[287] Fix | Delete
[288] Fix | Delete
/* Destroy thread attribute *ATTR. */
[289] Fix | Delete
extern int pthread_attr_destroy (pthread_attr_t *__attr)
[290] Fix | Delete
__THROW __nonnull ((1));
[291] Fix | Delete
[292] Fix | Delete
/* Get detach state attribute. */
[293] Fix | Delete
extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
[294] Fix | Delete
int *__detachstate)
[295] Fix | Delete
__THROW __nonnull ((1, 2));
[296] Fix | Delete
[297] Fix | Delete
/* Set detach state attribute. */
[298] Fix | Delete
extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
[299] Fix | Delete
int __detachstate)
[300] Fix | Delete
__THROW __nonnull ((1));
[301] Fix | Delete
[302] Fix | Delete
[303] Fix | Delete
/* Get the size of the guard area created for stack overflow protection. */
[304] Fix | Delete
extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
[305] Fix | Delete
size_t *__guardsize)
[306] Fix | Delete
__THROW __nonnull ((1, 2));
[307] Fix | Delete
[308] Fix | Delete
/* Set the size of the guard area created for stack overflow protection. */
[309] Fix | Delete
extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
[310] Fix | Delete
size_t __guardsize)
[311] Fix | Delete
__THROW __nonnull ((1));
[312] Fix | Delete
[313] Fix | Delete
[314] Fix | Delete
/* Return in *PARAM the scheduling parameters of *ATTR. */
[315] Fix | Delete
extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
[316] Fix | Delete
struct sched_param *__restrict __param)
[317] Fix | Delete
__THROW __nonnull ((1, 2));
[318] Fix | Delete
[319] Fix | Delete
/* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
[320] Fix | Delete
extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
[321] Fix | Delete
const struct sched_param *__restrict
[322] Fix | Delete
__param) __THROW __nonnull ((1, 2));
[323] Fix | Delete
[324] Fix | Delete
/* Return in *POLICY the scheduling policy of *ATTR. */
[325] Fix | Delete
extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
[326] Fix | Delete
__attr, int *__restrict __policy)
[327] Fix | Delete
__THROW __nonnull ((1, 2));
[328] Fix | Delete
[329] Fix | Delete
/* Set scheduling policy in *ATTR according to POLICY. */
[330] Fix | Delete
extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
[331] Fix | Delete
__THROW __nonnull ((1));
[332] Fix | Delete
[333] Fix | Delete
/* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
[334] Fix | Delete
extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
[335] Fix | Delete
__attr, int *__restrict __inherit)
[336] Fix | Delete
__THROW __nonnull ((1, 2));
[337] Fix | Delete
[338] Fix | Delete
/* Set scheduling inheritance mode in *ATTR according to INHERIT. */
[339] Fix | Delete
extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
[340] Fix | Delete
int __inherit)
[341] Fix | Delete
__THROW __nonnull ((1));
[342] Fix | Delete
[343] Fix | Delete
[344] Fix | Delete
/* Return in *SCOPE the scheduling contention scope of *ATTR. */
[345] Fix | Delete
extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
[346] Fix | Delete
int *__restrict __scope)
[347] Fix | Delete
__THROW __nonnull ((1, 2));
[348] Fix | Delete
[349] Fix | Delete
/* Set scheduling contention scope in *ATTR according to SCOPE. */
[350] Fix | Delete
extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
[351] Fix | Delete
__THROW __nonnull ((1));
[352] Fix | Delete
[353] Fix | Delete
/* Return the previously set address for the stack. */
[354] Fix | Delete
extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
[355] Fix | Delete
__attr, void **__restrict __stackaddr)
[356] Fix | Delete
__THROW __nonnull ((1, 2)) __attribute_deprecated__;
[357] Fix | Delete
[358] Fix | Delete
/* Set the starting address of the stack of the thread to be created.
[359] Fix | Delete
Depending on whether the stack grows up or down the value must either
[360] Fix | Delete
be higher or lower than all the address in the memory block. The
[361] Fix | Delete
minimal size of the block must be PTHREAD_STACK_MIN. */
[362] Fix | Delete
extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
[363] Fix | Delete
void *__stackaddr)
[364] Fix | Delete
__THROW __nonnull ((1)) __attribute_deprecated__;
[365] Fix | Delete
[366] Fix | Delete
/* Return the currently used minimal stack size. */
[367] Fix | Delete
extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
[368] Fix | Delete
__attr, size_t *__restrict __stacksize)
[369] Fix | Delete
__THROW __nonnull ((1, 2));
[370] Fix | Delete
[371] Fix | Delete
/* Add information about the minimum stack size needed for the thread
[372] Fix | Delete
to be started. This size must never be less than PTHREAD_STACK_MIN
[373] Fix | Delete
and must also not exceed the system limits. */
[374] Fix | Delete
extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
[375] Fix | Delete
size_t __stacksize)
[376] Fix | Delete
__THROW __nonnull ((1));
[377] Fix | Delete
[378] Fix | Delete
#ifdef __USE_XOPEN2K
[379] Fix | Delete
/* Return the previously set address for the stack. */
[380] Fix | Delete
extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
[381] Fix | Delete
void **__restrict __stackaddr,
[382] Fix | Delete
size_t *__restrict __stacksize)
[383] Fix | Delete
__THROW __nonnull ((1, 2, 3));
[384] Fix | Delete
[385] Fix | Delete
/* The following two interfaces are intended to replace the last two. They
[386] Fix | Delete
require setting the address as well as the size since only setting the
[387] Fix | Delete
address will make the implementation on some architectures impossible. */
[388] Fix | Delete
extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
[389] Fix | Delete
size_t __stacksize) __THROW __nonnull ((1));
[390] Fix | Delete
#endif
[391] Fix | Delete
[392] Fix | Delete
#ifdef __USE_GNU
[393] Fix | Delete
/* Thread created with attribute ATTR will be limited to run only on
[394] Fix | Delete
the processors represented in CPUSET. */
[395] Fix | Delete
extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
[396] Fix | Delete
size_t __cpusetsize,
[397] Fix | Delete
const cpu_set_t *__cpuset)
[398] Fix | Delete
__THROW __nonnull ((1, 3));
[399] Fix | Delete
[400] Fix | Delete
/* Get bit set in CPUSET representing the processors threads created with
[401] Fix | Delete
ATTR can run on. */
[402] Fix | Delete
extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
[403] Fix | Delete
size_t __cpusetsize,
[404] Fix | Delete
cpu_set_t *__cpuset)
[405] Fix | Delete
__THROW __nonnull ((1, 3));
[406] Fix | Delete
[407] Fix | Delete
/* Get the default attributes used by pthread_create in this process. */
[408] Fix | Delete
extern int pthread_getattr_default_np (pthread_attr_t *__attr)
[409] Fix | Delete
__THROW __nonnull ((1));
[410] Fix | Delete
[411] Fix | Delete
/* Set the default attributes to be used by pthread_create in this
[412] Fix | Delete
process. */
[413] Fix | Delete
extern int pthread_setattr_default_np (const pthread_attr_t *__attr)
[414] Fix | Delete
__THROW __nonnull ((1));
[415] Fix | Delete
[416] Fix | Delete
/* Initialize thread attribute *ATTR with attributes corresponding to the
[417] Fix | Delete
already running thread TH. It shall be called on uninitialized ATTR
[418] Fix | Delete
and destroyed with pthread_attr_destroy when no longer needed. */
[419] Fix | Delete
extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
[420] Fix | Delete
__THROW __nonnull ((2));
[421] Fix | Delete
#endif
[422] Fix | Delete
[423] Fix | Delete
[424] Fix | Delete
/* Functions for scheduling control. */
[425] Fix | Delete
[426] Fix | Delete
/* Set the scheduling parameters for TARGET_THREAD according to POLICY
[427] Fix | Delete
and *PARAM. */
[428] Fix | Delete
extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
[429] Fix | Delete
const struct sched_param *__param)
[430] Fix | Delete
__THROW __nonnull ((3));
[431] Fix | Delete
[432] Fix | Delete
/* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
[433] Fix | Delete
extern int pthread_getschedparam (pthread_t __target_thread,
[434] Fix | Delete
int *__restrict __policy,
[435] Fix | Delete
struct sched_param *__restrict __param)
[436] Fix | Delete
__THROW __nonnull ((2, 3));
[437] Fix | Delete
[438] Fix | Delete
/* Set the scheduling priority for TARGET_THREAD. */
[439] Fix | Delete
extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
[440] Fix | Delete
__THROW;
[441] Fix | Delete
[442] Fix | Delete
[443] Fix | Delete
#ifdef __USE_GNU
[444] Fix | Delete
/* Get thread name visible in the kernel and its interfaces. */
[445] Fix | Delete
extern int pthread_getname_np (pthread_t __target_thread, char *__buf,
[446] Fix | Delete
size_t __buflen)
[447] Fix | Delete
__THROW __nonnull ((2));
[448] Fix | Delete
[449] Fix | Delete
/* Set thread name visible in the kernel and its interfaces. */
[450] Fix | Delete
extern int pthread_setname_np (pthread_t __target_thread, const char *__name)
[451] Fix | Delete
__THROW __nonnull ((2));
[452] Fix | Delete
#endif
[453] Fix | Delete
[454] Fix | Delete
[455] Fix | Delete
#ifdef __USE_UNIX98
[456] Fix | Delete
/* Determine level of concurrency. */
[457] Fix | Delete
extern int pthread_getconcurrency (void) __THROW;
[458] Fix | Delete
[459] Fix | Delete
/* Set new concurrency level to LEVEL. */
[460] Fix | Delete
extern int pthread_setconcurrency (int __level) __THROW;
[461] Fix | Delete
#endif
[462] Fix | Delete
[463] Fix | Delete
#ifdef __USE_GNU
[464] Fix | Delete
/* Yield the processor to another thread or process.
[465] Fix | Delete
This function is similar to the POSIX `sched_yield' function but
[466] Fix | Delete
might be differently implemented in the case of a m-on-n thread
[467] Fix | Delete
implementation. */
[468] Fix | Delete
extern int pthread_yield (void) __THROW;
[469] Fix | Delete
[470] Fix | Delete
[471] Fix | Delete
/* Limit specified thread TH to run only on the processors represented
[472] Fix | Delete
in CPUSET. */
[473] Fix | Delete
extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
[474] Fix | Delete
const cpu_set_t *__cpuset)
[475] Fix | Delete
__THROW __nonnull ((3));
[476] Fix | Delete
[477] Fix | Delete
/* Get bit set in CPUSET representing the processors TH can run on. */
[478] Fix | Delete
extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
[479] Fix | Delete
cpu_set_t *__cpuset)
[480] Fix | Delete
__THROW __nonnull ((3));
[481] Fix | Delete
#endif
[482] Fix | Delete
[483] Fix | Delete
[484] Fix | Delete
/* Functions for handling initialization. */
[485] Fix | Delete
[486] Fix | Delete
/* Guarantee that the initialization function INIT_ROUTINE will be called
[487] Fix | Delete
only once, even if pthread_once is executed several times with the
[488] Fix | Delete
same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or
[489] Fix | Delete
extern variable initialized to PTHREAD_ONCE_INIT.
[490] Fix | Delete
[491] Fix | Delete
The initialization functions might throw exception which is why
[492] Fix | Delete
this function is not marked with __THROW. */
[493] Fix | Delete
extern int pthread_once (pthread_once_t *__once_control,
[494] Fix | Delete
void (*__init_routine) (void)) __nonnull ((1, 2));
[495] Fix | Delete
[496] Fix | Delete
[497] Fix | Delete
/* Functions for handling cancellation.
[498] Fix | Delete
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function