Читаем Programming with POSIX® Threads полностью

Determine the priority ceiling at which threads will run while owning a mutex created with attr.

References: 3.2, 5.2.1, 5.5.5 Headers: 

Errors: [ENOSYS] priority scheduling is not supported.

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

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

pthread_mutexattr_getprotocol... [_POSIX_THREAD_PRIO_INHERIT_POSIX_THREAD_PRIO_PROTECT]

int pthread_mutexattr_getprotocol (

const pthread_mutexattr_t *attr,

int *protocol);

Determine whether mutexes created with attr have priority ceiling protocol protect), priority inheritance protocol (inherit), or no priority protocol (none).

protocol

PTHREAD_PRIO_NONE No priority inheritance

protocol.

PTHREAD_PRIO_INHERIT While owning mutex, thread

inherits highest priority of any thread waiting for the mutex.

PTHREAD_PRIO_PROTECT While owning mutex, thread

inherits mutex priority ceiling.

References: 3.2,5.2.1,5.5.5 Headers: 

Errors: [ENOSYS] priority scheduling is not supported.

[EINVAL] attr invalid. Hint: Inherit protocol is expensive, and protect protocol is inappropriate

unless the creator of the mutex also creates and controls all threads

that might lock the mutex.

pthread_mutexattr_setprioceiling...............................................[_POSIX_THREAD_PRIO_PROTECT ]

int pthread_mutexattr_setprioceiling ( pthread_mutexattr_t *attr,

int prioceiling);

Specify the priority ceiling at which threads will run while owning a mutex created with attr. The value of prioceiling must be a valid priority parameter for the

SCHED_FIFO policy.

References: 3.2,5.2.1,5.5.5 Headers: 

Errors: [ENOSYS] priority scheduling is not supported.

[EINVAL] attr or prioceiling invalid.

[EPERM] no permission to set prioceiling. Hint: Protect protocol is inappropriate unless the creator of the mutex

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

pthread_mutexattr_setprotocol .... [_POSIX_THREAD_PRIO_INHERIT_POSIX_THREAD_PRIO_PROTECT]

int pthread_mutexattr_setprotocol (

pthread_mutexattr_t *attr,

int protocol);

Specify whether mutexes created with attr have priority ceiling protocol protect), priority inheritance protocol (inherit), or no priority protocol (none).

protocol

PTHREAD_PRIO_NONE No priority inheritance

protocol.

PTHREAD_PRIO_INHERIT While owning mutex, thread

inherits highest priority of any thread waiting for the mutex.

PTHREAD_PRIO_PROTECT While owning mutex, thread

inherits mutex priority ceiling.

References: 3.2,5.2.1,5.5.5 Headers: 

Errors: [ENOSYS] priority scheduling is not supported.

[EINVAL] attr or protocol invalid.

[ENOTSUP] protocol value is not supported. Hint: Inherit protocol is expensive, and protect protocol is inappropriate

unless the creator of the mutex also creates and controls all threads

that might lock the mutex.

pthread_setschedparam..............................................[_POSIX_THREAD_PRIORITY_SCHEDULING]

int pthread_setschedparam (

pthread_t thread,

int policy

const struct sched_param *param);

Specify the scheduling policy and parameters (param) to be used by thread.

policy

SCHED_FIFO

SCHED_RR

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

Like SCHED_FIFO, but subject to periodic timeslicing.

SCHED_OTHER

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

References:

Headers:

Errors:

Hint:

5.5

[ENOSYS] priority scheduling is not supported.

[ESRCH] thread does not refer to an existing thread.

[EINVAL] policy or param is invalid.

[ENOTSUP] policy or param is unsupported value.

[EPERM] no permission to set policy or param.

Try to avoid dynamically modifying thread scheduling policy and

parameters, if possible.

sched_get_priority_max..............................................................[_POSIX_PRIORITY_SCHEDULING]

int sched_get_priority_max (

int policy);

Return the maximum integer priority allowed for the specified scheduling policy.

policy

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

Like SCHED_FIFO, but subject to periodic timeslicing.

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

References: 5.5.2 Headers: 

Errors: [ENOSYS] priority scheduling is not supported.

[EINVAL] policy is invalid. Hint: Priority min and max are integer values—you can compute relative

values, for example, half and quarter points in range.

SCHED_FIFO

Перейти на страницу:

Похожие книги

1С: Бухгалтерия 8 с нуля
1С: Бухгалтерия 8 с нуля

Книга содержит полное описание приемов и методов работы с программой 1С:Бухгалтерия 8. Рассматривается автоматизация всех основных участков бухгалтерии: учет наличных и безналичных денежных средств, основных средств и НМА, прихода и расхода товарно-материальных ценностей, зарплаты, производства. Описано, как вводить исходные данные, заполнять справочники и каталоги, работать с первичными документами, проводить их по учету, формировать разнообразные отчеты, выводить данные на печать, настраивать программу и использовать ее сервисные функции. Каждый урок содержит подробное описание рассматриваемой темы с детальным разбором и иллюстрированием всех этапов.Для широкого круга пользователей.

Алексей Анатольевич Гладкий

Программирование, программы, базы данных / Программное обеспечение / Бухучет и аудит / Финансы и бизнес / Книги по IT / Словари и Энциклопедии
1С: Управление торговлей 8.2
1С: Управление торговлей 8.2

Современные торговые предприятия предлагают своим клиентам широчайший ассортимент товаров, который исчисляется тысячами и десятками тысяч наименований. Причем многие позиции могут реализовываться на разных условиях: предоплата, отсрочка платежи, скидка, наценка, объем партии, и т.д. Клиенты зачастую делятся на категории – VIP-клиент, обычный клиент, постоянный клиент, мелкооптовый клиент, и т.д. Товарные позиции могут комплектоваться и разукомплектовываться, многие товары подлежат обязательной сертификации и гигиеническим исследованиям, некондиционные позиции необходимо списывать, на складах периодически должна проводиться инвентаризация, каждая компания должна иметь свою маркетинговую политику и т.д., вообщем – современное торговое предприятие представляет живой организм, находящийся в постоянном движении.Очевидно, что вся эта кипучая деятельность требует автоматизации. Для решения этой задачи существуют специальные программные средства, и в этой книге мы познакомим вам с самым популярным продуктом, предназначенным для автоматизации деятельности торгового предприятия – «1С Управление торговлей», которое реализовано на новейшей технологической платформе версии 1С 8.2.

Алексей Анатольевич Гладкий

Финансы / Программирование, программы, базы данных