Thread management posix section 16, Functions implemented, Functions omitted – Comtrol eCos User Manual

Page 467: Notes

Advertising
background image

Chapter 31. POSIX Standard Support

Thread Management [POSIX Section 16]

Functions Implemented

int pthread_attr_init(pthread_attr_t

attr);

int pthread_attr_destroy(pthread_attr_t

attr);

int pthread_attr_setdetachstate(pthread_attr_t

attr,

int detachstate);

int pthread_attr_getdetachstate(const pthread_attr_t

attr,

int

detachstate);

int pthread_attr_setstackaddr(pthread_attr_t

attr,

void

stackaddr);

int pthread_attr_getstackaddr(const pthread_attr_t

attr,

void

∗∗

stackaddr);

int pthread_attr_setstacksize(pthread_attr_t

attr,

size_t stacksize);

int pthread_attr_getstacksize(const pthread_attr_t

attr,

size_t

stacksize);

int pthread_create( pthread_t

thread,

const pthread_attr_t

attr,

void

(

start_routine)(void

),

void

arg);

pthread_t pthread_self( void );

int pthread_equal(pthread_t thread1, pthread_t thread2);

void pthread_exit(void

retval);

int pthread_join(pthread_t thread, void

∗∗

thread_return);

int pthread_detach(pthread_t thread);

int pthread_once(pthread_once_t

once_control,

void (

init_routine)(void));

Functions Omitted

<none>

Notes

The presence of thread support as a whole is controlled by the the CYGPKG_POSIX_PTHREAD configuration

option. Note that disabling this will also disable many other features of the POSIX package, since these are
intimately bound up with the thread mechanism.

The default (non-scheduling) thread attributes are:

detachstate

PTHREAD_CREATE_JOINABLE

stackaddr

unset

stacksize

unset

Dynamic thread stack allocation is only provided if there is an implementation of malloc() configured (i.e. a

package implements the CYGINT_MEMALLOC_MALLOC_ALLOCATORS interface). If there is no malloc()

363

Advertising