Errors: [ENOSYS] priority scheduling is not supported.

[EINVAL] attr invalid. Hint: Implementation must support one or both of these, but need not

support both.

pthread_attr_setinheritsched.......................................[_POSIX_THREAD_PRIORITY_SCHEDULING ]

int pthread_attr_setinheritsched ( pthread_attr_t *attr, int inheritsched);

Specify whether threads created with attr will run using the scheduling policy and parameters of the creator or those specified in the attributes object. When you change the scheduling policy or parameters in a thread attributes object, you must change the inheritsched attribute from PTHREAD_INHERIT_SCHED to PTHREAD_ EXPLICIT_SCHED. The default is implementation-defined.

inheritsched

PTHREAD_INHERIT_SCHED

Use creator's scheduling policy and parameters.

PTHREAD_EXPLICIT_SCHED

Use scheduling policy and parameters in attributes object.

References: 5.2.3, 5.5 Headers: <pthread.h>

Errors: [ENOSYS] priority scheduling is not supported.

[EINVAL] attr or inheritsched invalid.

pthread_attr_setschedparam......................................[_POSIX_THREAD_PRIORITY_SCHEDULING]

int pthread_attr_setschedparam (

pthread_attr_t *attr,

const struct sched_param *param);

Specify the scheduling parameters used by threads created with attr. The default param is implementation defined.

References: 5.2.3, 5.5 Headers: <pthread.h>

Errors: [ENOSYS] priority scheduling is not supported.

[EINVAL] attr or param invalid. [ENOTSUP] param set to supported value.

pthread_attr_setschedpolicy....................................... [_POSIX_THREAD_PRIORITY_SCHEDULING]

int pthread_attr_setschedpolicy ( pthread_attr_t *attr, int policy);

Specify the scheduling policy used by threads created with attr. The default policy is implementation defined.

SCHED_FIFO

SCHED_RR

SCHED_OTHER

policy

Run thread until it blocks; preempt lower-priority threads when ready.

Like SCHED_FIFO, but sub-ject to periodic timeslicing.

Implementation defined(may be SCHED_FIFO, SCHED_RR, or something else).

References: 5.2.3, 5.5 Headers: <pthread.h>

Errors: [ENOSYS] priority scheduling is not supported

[EINVAL] attr or policy invalid. [ENOTSUP] param set to supported value.

pthread_attr_setscope.................................................. [_POSIX_THREAD_PRIORITY_SCHEDULING]

int pthread_attr_setscope (

pthread_attr_t *attr,

int contentionscope);

Specify the contention scope used by threads created with attr. The default is implementation defined.

contentionscope

PTHREAD SCOPE PROCESS

Thread contends with other threads in the process for processor resources.

PTHREAD SCOPE SYSTEM

Thread contends with threads in all processes for processor resources.

References:

Headers:

Errors:

Hint:

5.2.3, 5.5 <pthread.h>

[ENOSYS] priority scheduling is not supported. [EINVAL] attr or contentionscope invalid. [ENOTSUP] contentionscope set to supported value. Implementation must support one or both of these, but need not support both.

pthread_getschedparam............................................. [_POSIX_THREAD_PRIORITY_SCHEDULING]

int pthread_getschedparam (

pthread_t thread,

int *policy

struct sched_param *param);

Determine the schedulingpolicy and parameters (param) currently used by thread.

policy

Run thread until it blocks; preempt lower-priority threads when ready.

SCHED_FIFO

SCHED_RR SCHED_OTHER

Like SCHED_FIFO, but subject to periodic timeslicing.

Implementation defined (may be SCHED_FIFO, SCHED_RR, or something else).

References: 5.2.3, 5.5 Headers: <pthread.h>

Errors: [ENOSYS] priority scheduling is not supported.

[ESRCH] thread does not refer to an existing thread. Hint: Try to avoid dynamically modifying thread scheduling policy and

parameters, if possible.

| prhread_mutex_getprioceiling................................................... [_POSIX_THREAD_PRIO_PROTECT]

int pthread_mutex_getprioceiling (

const pthread_mutex_t *mutex,

int *prioceiling);

Determine the priority ceiling at which threads will run while owning mutex.

References: 3.2,5.2.1,5.5.5 Headers: <pthread.h>

Errors: [ENOSYS] priority scheduling is not supported.

[EINVAL] mutex invalid. Hint: Protect protocol is inappropriate unless the creator of the mutex

also creates and controls all threads that might lock the mutex.

pthread_mutex_setprioceiling.................................................... [_POSIX_THREAD_PRIO_PROTECT ]

int pthread_mutex_getprioceiling ( pthread_mutex_t *mutex, int prioceiling,

int *old_ceiling);

Specify the priority ceiling at which threads will run while owning mutex. Returns previous priority ceiling for mutex.

References: 3.2,5.2.1,5.5.5 Headers: <pthread.h>

Errors: [ENOSYS] priority scheduling is not supported.

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату