}
#endif // defined(_pthread_attr_unsupported_) && !defined(_di_f_thread_attribute_affinity_set_)
-#ifndef _di_f_thread_attribute_condition_clock_get_
- f_status_t f_thread_attribute_condition_clock_get(const f_thread_condition_attribute_t * const attribute, clockid_t * const id) {
- #ifndef _di_level_0_parameter_checking_
- if (!attribute) return F_status_set_error(F_parameter);
- if (!id) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- const int error = pthread_condattr_getclock(attribute, id);
-
- if (error) {
- if (error == EINVAL) return F_status_set_error(F_parameter);
-
- return F_status_set_error(F_failure);
- }
-
- return F_none;
- }
-#endif // _di_f_thread_attribute_condition_clock_get_
-
-#ifndef _di_f_thread_attribute_condition_clock_set_
- f_status_t f_thread_attribute_condition_clock_set(const clockid_t id, f_thread_condition_attribute_t * const attribute) {
- #ifndef _di_level_0_parameter_checking_
- if (!attribute) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- const int error = pthread_condattr_setclock(attribute, id);
-
- if (error) {
- if (error == EINVAL) return F_status_set_error(F_parameter);
-
- return F_status_set_error(F_failure);
- }
-
- return F_none;
- }
-#endif // _di_f_thread_attribute_condition_clock_set_
-
-#ifndef _di_f_thread_attribute_condition_shared_get_
- f_status_t f_thread_attribute_condition_shared_get(const f_thread_condition_attribute_t * const attribute, int * const shared) {
+#ifndef _di_f_thread_attribute_concurrency_get_
+ f_status_t f_thread_attribute_concurrency_get(int * const level) {
#ifndef _di_level_0_parameter_checking_
- if (!attribute) return F_status_set_error(F_parameter);
- if (!shared) return F_status_set_error(F_parameter);
+ if (!level) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- const int error = pthread_condattr_getpshared(attribute, shared);
-
- if (error) {
- if (error == EINVAL) return F_status_set_error(F_parameter);
-
- return F_status_set_error(F_failure);
- }
+ *level = pthread_getconcurrency();
return F_none;
}
-#endif // _di_f_thread_attribute_condition_shared_get_
+#endif // _di_f_thread_attribute_concurrency_get_
-#ifndef _di_f_thread_attribute_condition_shared_set_
- f_status_t f_thread_attribute_condition_shared_set(const int shared, f_thread_condition_attribute_t * const attribute) {
- #ifndef _di_level_0_parameter_checking_
- if (!attribute) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_thread_attribute_concurrency_set_
+ f_status_t f_thread_attribute_concurrency_set(const int level) {
- const int error = pthread_condattr_setpshared(attribute, shared);
+ const int error = pthread_setconcurrency(level);
if (error) {
+ if (error == EAGAIN) return F_status_set_error(F_resource_not);
if (error == EINVAL) return F_status_set_error(F_parameter);
return F_status_set_error(F_failure);
return F_none;
}
-#endif // _di_f_thread_attribute_condition_shared_set_
+#endif // _di_f_thread_attribute_concurrency_set_
#ifndef _di_f_thread_attribute_create_
f_status_t f_thread_attribute_create(f_thread_attribute_t * const attribute) {
#ifndef _di_f_thread_clock_get_id_
f_status_t f_thread_clock_get_id(const f_thread_id_t id_thread, clockid_t * const id_clock) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!id_clock) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
const int error = pthread_getcpuclockid(id_thread, id_clock);
}
#endif // _di_f_thread_compare_
-#ifndef _di_f_thread_attribute_concurrency_get_
- f_status_t f_thread_attribute_concurrency_get(int * const level) {
+#ifndef _di_f_thread_condition_attribute_clock_get_
+ f_status_t f_thread_condition_attribute_clock_get(const f_thread_condition_attribute_t * const attribute, clockid_t * const id) {
#ifndef _di_level_0_parameter_checking_
- if (!level) return F_status_set_error(F_parameter);
+ if (!attribute) return F_status_set_error(F_parameter);
+ if (!id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- *level = pthread_getconcurrency();
+ const int error = pthread_condattr_getclock(attribute, id);
+
+ if (error) {
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
return F_none;
}
-#endif // _di_f_thread_attribute_concurrency_get_
+#endif // _di_f_thread_condition_attribute_clock_get_
-#ifndef _di_f_thread_attribute_concurrency_set_
- f_status_t f_thread_attribute_concurrency_set(const int level) {
+#ifndef _di_f_thread_condition_attribute_clock_set_
+ f_status_t f_thread_condition_attribute_clock_set(const clockid_t id, f_thread_condition_attribute_t * const attribute) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!attribute) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
- const int error = pthread_setconcurrency(level);
+ const int error = pthread_condattr_setclock(attribute, id);
if (error) {
if (error == EINVAL) return F_status_set_error(F_parameter);
- if (error == EAGAIN) return F_status_set_error(F_resource_not);
return F_status_set_error(F_failure);
}
return F_none;
}
-#endif // _di_f_thread_attribute_concurrency_set_
+#endif // _di_f_thread_condition_attribute_clock_set_
#ifndef _di_f_thread_condition_attribute_create_
f_status_t f_thread_condition_attribute_create(f_thread_condition_attribute_t * const attribute) {
}
#endif // _di_f_thread_condition_attribute_delete_
+#ifndef _di_f_thread_condition_attribute_shared_get_
+ f_status_t f_thread_condition_attribute_shared_get(const f_thread_condition_attribute_t * const attribute, int * const shared) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!attribute) return F_status_set_error(F_parameter);
+ if (!shared) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ const int error = pthread_condattr_getpshared(attribute, shared);
+
+ if (error) {
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_condition_attribute_shared_get_
+
+#ifndef _di_f_thread_condition_attribute_shared_set_
+ f_status_t f_thread_condition_attribute_shared_set(const int shared, f_thread_condition_attribute_t * const attribute) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!attribute) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ const int error = pthread_condattr_setpshared(attribute, shared);
+
+ if (error) {
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+
+ return F_status_set_error(F_failure);
+ }
+
+ return F_none;
+ }
+#endif // _di_f_thread_condition_attribute_shared_set_
+
#ifndef _di_f_thread_condition_create_
f_status_t f_thread_condition_create(const f_thread_condition_attribute_t * const attribute, f_thread_condition_t * const condition) {
#ifndef _di_level_0_parameter_checking_
}
#endif // _di_f_thread_condition_delete_
-#ifndef _di_f_thread_condition_signal_all_
- f_status_t f_thread_condition_signal_all(f_thread_condition_t * const condition) {
+#ifndef _di_f_thread_condition_signal_
+ f_status_t f_thread_condition_signal(f_thread_condition_t * const condition) {
#ifndef _di_level_0_parameter_checking_
if (!condition) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- const int error = pthread_cond_broadcast(condition);
+ const int error = pthread_cond_signal(condition);
if (error) {
if (error == EINVAL) return F_status_set_error(F_parameter);
return F_none;
}
-#endif // _di_f_thread_condition_signal_all_
+#endif // _di_f_thread_condition_signal_
-#ifndef _di_f_thread_condition_signal_
- f_status_t f_thread_condition_signal(f_thread_condition_t * const condition) {
+#ifndef _di_f_thread_condition_signal_all_
+ f_status_t f_thread_condition_signal_all(f_thread_condition_t * const condition) {
#ifndef _di_level_0_parameter_checking_
if (!condition) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- const int error = pthread_cond_signal(condition);
+ const int error = pthread_cond_broadcast(condition);
if (error) {
if (error == EINVAL) return F_status_set_error(F_parameter);
return F_none;
}
-#endif // _di_f_thread_condition_signal_
+#endif // _di_f_thread_condition_signal_all_
#ifndef _di_f_thread_condition_wait_
f_status_t f_thread_condition_wait(f_thread_condition_t * const condition, f_thread_mutex_t * const mutex) {
if (error == EAGAIN) return F_status_set_error(F_resource_not);
if (error == EDEADLK) return F_status_set_error(F_deadlock);
if (error == EINVAL) return F_status_set_error(F_parameter);
- if (error == ETIMEDOUT) return F_time;
return F_status_set_error(F_failure);
}
#endif // _di_f_thread_lock_read_
#ifndef _di_f_thread_lock_read_timed_
- f_status_t f_thread_lock_read_timed(const struct timespec *timeout, f_thread_lock_t * const lock) {
+ f_status_t f_thread_lock_read_timed(const struct timespec * const timeout, f_thread_lock_t * const lock) {
#ifndef _di_level_0_parameter_checking_
if (!timeout) return F_status_set_error(F_parameter);
if (!lock) return F_status_set_error(F_parameter);
#endif // _di_f_thread_lock_write_
#ifndef _di_f_thread_lock_write_timed_
- f_status_t f_thread_lock_write_timed(const struct timespec *timeout, f_thread_lock_t * const lock) {
+ f_status_t f_thread_lock_write_timed(const struct timespec * const timeout, f_thread_lock_t * const lock) {
#ifndef _di_level_0_parameter_checking_
if (!timeout) return F_status_set_error(F_parameter);
if (!lock) return F_status_set_error(F_parameter);
}
#endif // _di_f_thread_mutex_attribute_priority_ceiling_set_
-#ifndef _di_f_thread_mutex_attribute_shared_get_
- f_status_t f_thread_mutex_attribute_shared_get(const f_thread_mutex_attribute_t * const attribute, int * const shared) {
+#ifndef _di_f_thread_mutex_attribute_protocol_get_
+ f_status_t f_thread_mutex_attribute_protocol_get(const f_thread_mutex_attribute_t * const attribute, int * const protocol) {
#ifndef _di_level_0_parameter_checking_
if (!attribute) return F_status_set_error(F_parameter);
- if (!shared) return F_status_set_error(F_parameter);
+ if (!protocol) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (pthread_mutexattr_getpshared(attribute, shared)) {
+ const int error = pthread_mutexattr_getprotocol(attribute, protocol);
+
+ if (error) {
+ if (error == EINVAL) return F_status_set_error(F_parameter);
+ if (error == EPERM) return F_status_set_error(F_prohibited);
+
return F_status_set_error(F_failure);
}
return F_none;
}
-#endif // _di_f_thread_mutex_attribute_shared_get_
+#endif // _di_f_thread_mutex_attribute_protocol_get_
-#ifndef _di_f_thread_mutex_attribute_shared_set_
- f_status_t f_thread_mutex_attribute_shared_set(const int shared, f_thread_mutex_attribute_t * const attribute) {
+#ifndef _di_f_thread_mutex_attribute_protocol_set_
+ f_status_t f_thread_mutex_attribute_protocol_set(const int protocol, f_thread_mutex_attribute_t * const attribute) {
#ifndef _di_level_0_parameter_checking_
if (!attribute) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- const int error = pthread_mutexattr_setpshared(attribute, shared);
+ const int error = pthread_mutexattr_setprotocol(attribute, protocol);
if (error) {
if (error == EINVAL) return F_status_set_error(F_parameter);
+ if (error == EPERM) return F_status_set_error(F_prohibited);
+ if (error == ENOTSUP) return F_status_set_error(F_supported_not);
return F_status_set_error(F_failure);
}
return F_none;
}
-#endif // _di_f_thread_mutex_attribute_shared_set_
+#endif // _di_f_thread_mutex_attribute_protocol_set_
-#ifndef _di_f_thread_mutex_attribute_type_get_
- f_status_t f_thread_mutex_attribute_type_get(const f_thread_mutex_attribute_t * const attribute, int * const type) {
+#ifndef _di_f_thread_mutex_attribute_shared_get_
+ f_status_t f_thread_mutex_attribute_shared_get(const f_thread_mutex_attribute_t * const attribute, int * const shared) {
#ifndef _di_level_0_parameter_checking_
if (!attribute) return F_status_set_error(F_parameter);
- if (!type) return F_status_set_error(F_parameter);
+ if (!shared) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (pthread_mutexattr_gettype(attribute, type)) {
+ if (pthread_mutexattr_getpshared(attribute, shared)) {
return F_status_set_error(F_failure);
}
return F_none;
}
-#endif // _di_f_thread_mutex_attribute_type_get_
+#endif // _di_f_thread_mutex_attribute_shared_get_
-#ifndef _di_f_thread_mutex_attribute_type_set_
- f_status_t f_thread_mutex_attribute_type_set(const int type, f_thread_mutex_attribute_t * const attribute) {
+#ifndef _di_f_thread_mutex_attribute_shared_set_
+ f_status_t f_thread_mutex_attribute_shared_set(const int shared, f_thread_mutex_attribute_t * const attribute) {
#ifndef _di_level_0_parameter_checking_
if (!attribute) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- const int error = pthread_mutexattr_settype(attribute, type);
+ const int error = pthread_mutexattr_setpshared(attribute, shared);
if (error) {
if (error == EINVAL) return F_status_set_error(F_parameter);
return F_none;
}
-#endif // _di_f_thread_mutex_attribute_type_set_
+#endif // _di_f_thread_mutex_attribute_shared_set_
-#ifndef _di_f_thread_mutex_attribute_protocol_get_
- f_status_t f_thread_mutex_attribute_protocol_get(const f_thread_mutex_attribute_t * const attribute, int * const protocol) {
+#ifndef _di_f_thread_mutex_attribute_type_get_
+ f_status_t f_thread_mutex_attribute_type_get(const f_thread_mutex_attribute_t * const attribute, int * const type) {
#ifndef _di_level_0_parameter_checking_
if (!attribute) return F_status_set_error(F_parameter);
- if (!protocol) return F_status_set_error(F_parameter);
+ if (!type) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- const int error = pthread_mutexattr_getprotocol(attribute, protocol);
-
- if (error) {
- if (error == EINVAL) return F_status_set_error(F_parameter);
- if (error == EPERM) return F_status_set_error(F_prohibited);
-
+ if (pthread_mutexattr_gettype(attribute, type)) {
return F_status_set_error(F_failure);
}
return F_none;
}
-#endif // _di_f_thread_mutex_attribute_protocol_get_
+#endif // _di_f_thread_mutex_attribute_type_get_
-#ifndef _di_f_thread_mutex_attribute_protocol_set_
- f_status_t f_thread_mutex_attribute_protocol_set(const int protocol, f_thread_mutex_attribute_t * const attribute) {
+#ifndef _di_f_thread_mutex_attribute_type_set_
+ f_status_t f_thread_mutex_attribute_type_set(const int type, f_thread_mutex_attribute_t * const attribute) {
#ifndef _di_level_0_parameter_checking_
if (!attribute) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- const int error = pthread_mutexattr_setprotocol(attribute, protocol);
+ const int error = pthread_mutexattr_settype(attribute, type);
if (error) {
if (error == EINVAL) return F_status_set_error(F_parameter);
- if (error == EPERM) return F_status_set_error(F_prohibited);
- if (error == ENOTSUP) return F_status_set_error(F_supported_not);
return F_status_set_error(F_failure);
}
return F_none;
}
-#endif // _di_f_thread_mutex_attribute_protocol_set_
+#endif // _di_f_thread_mutex_attribute_type_set_
#ifndef _di_f_thread_mutex_create_
f_status_t f_thread_mutex_create(f_thread_mutex_attribute_t * const attribute, f_thread_mutex_t * const mutex) {
#endif // _di_f_thread_mutex_lock_
#ifndef _di_f_thread_mutex_lock_timed_
- f_status_t f_thread_mutex_lock_timed(const struct timespec *timeout, f_thread_mutex_t * const mutex) {
+ f_status_t f_thread_mutex_lock_timed(const struct timespec * const timeout, f_thread_mutex_t * const mutex) {
#ifndef _di_level_0_parameter_checking_
if (!timeout) return F_status_set_error(F_parameter);
if (!mutex) return F_status_set_error(F_parameter);
#endif // _di_f_thread_semaphore_lock_
#ifndef _di_f_thread_semaphore_lock_timed_
- f_status_t f_thread_semaphore_lock_timed(const struct timespec *timeout, f_thread_semaphore_t * const semaphore) {
+ f_status_t f_thread_semaphore_lock_timed(const struct timespec * const timeout, f_thread_semaphore_t * const semaphore) {
#ifndef _di_level_0_parameter_checking_
if (!timeout) return F_status_set_error(F_parameter);
if (!semaphore) return F_status_set_error(F_parameter);
#endif // _di_f_thread_attribute_affinity_set_
/**
- * Get the clock selection thread condition attribute.
- *
- * @param attribute
- * The thread condition attribute.
- * @param id
- * The clock ID.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * F_failure (with error bit) on any other error.
+ * Get the level of concurrency.
*
- * @see pthread_condattr_getclock()
- */
-#ifndef _di_f_thread_attribute_condition_clock_get_
- extern f_status_t f_thread_attribute_condition_clock_get(const f_thread_condition_attribute_t * const attribute, clockid_t * const id);
-#endif // _di_f_thread_attribute_condition_clock_get_
-
-/**
- * Set the clock selection thread condition attribute.
+ * A level of 0 designates the system to automatically choose concurrency level.
+ * Any non-zero level is considered a hint and will be followed at the systems discretion.
*
- * @param id
- * The clock ID.
- * @param attribute
- * The thread condition attribute.
+ * @param level
+ * The concurrency level.
*
* @return
* F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
+ * F_resource_not (with error bit) if the new level would cause the system to exceed available resources.
*
* F_failure (with error bit) on any other error.
*
- * @see pthread_condattr_setclock()
+ * @see pthread_getconcurrency()
*/
-#ifndef _di_f_thread_attribute_condition_clock_set_
- extern f_status_t f_thread_attribute_condition_clock_set(const clockid_t id, f_thread_condition_attribute_t * const attribute);
-#endif // _di_f_thread_attribute_condition_clock_set_
+#ifndef _di_f_thread_attribute_concurrency_get_
+ extern f_status_t f_thread_attribute_concurrency_get(int * const level);
+#endif // _di_f_thread_attribute_concurrency_get_
/**
- * Get the process shared thread condition attribute.
- *
- * @param attribute
- * The thread condition attribute.
- * @param shared
- * The process shared attribute value.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- *
- * F_failure (with error bit) on any other error.
+ * Set the level of concurrency.
*
- * @see pthread_condattr_getpshared()
- */
-#ifndef _di_f_thread_attribute_condition_shared_get_
- extern f_status_t f_thread_attribute_condition_shared_get(const f_thread_condition_attribute_t * const attribute, int * const shared);
-#endif // _di_f_thread_attribute_condition_shared_get_
-
-/**
- * Set the process shared thread condition attribute.
+ * A level of 0 designates the system to automatically choose concurrency level.
+ * Any non-zero level is considered a hint and will be followed at the systems discretion.
*
- * @param shared
- * The process shared attribute value.
- * @param attribute
- * The thread condition attribute.
+ * @param level
+ * The concurrency level.
*
* @return
* F_none on success.
*
* F_failure (with error bit) on any other error.
*
- * @see pthread_condattr_setpshared()
+ * @see pthread_setconcurrency()
*/
-#ifndef _di_f_thread_attribute_condition_shared_set_
- extern f_status_t f_thread_attribute_condition_shared_set(const int shared, f_thread_condition_attribute_t * const attribute);
-#endif // _di_f_thread_attribute_condition_shared_set_
+#ifndef _di_f_thread_attribute_concurrency_set_
+ extern f_status_t f_thread_attribute_concurrency_set(const int level);
+#endif // _di_f_thread_attribute_concurrency_set_
/**
* Create (initialize) a thread attribute structure.
#endif // _di_f_thread_compare_
/**
- * Get the level of concurrency.
- *
- * A level of 0 designates the system to automatically choose concurrency level.
- * Any non-zero level is considered a hint and will be followed at the systems discretion.
+ * Initialize a attribute.
*
- * @param level
- * The concurrency level.
+ * @param attribute
+ * The attribute to set.
+ * This assigns the default to the attribute.
*
* @return
* F_none on success.
*
* F_parameter (with error bit) if a parameter is invalid.
- * F_resource_not (with error bit) if the new level would cause the system to exceed available resources.
*
* F_failure (with error bit) on any other error.
*
- * @see pthread_getconcurrency()
+ * @see pthread_condattr_init()
*/
-#ifndef _di_f_thread_attribute_concurrency_get_
- extern f_status_t f_thread_attribute_concurrency_get(int * const level);
-#endif // _di_f_thread_attribute_concurrency_get_
+#ifndef _di_f_thread_condition_attribute_create_
+ extern f_status_t f_thread_condition_attribute_create(f_thread_condition_attribute_t * const attribute);
+#endif // _di_f_thread_condition_attribute_create_
/**
- * Set the level of concurrency.
- *
- * A level of 0 designates the system to automatically choose concurrency level.
- * Any non-zero level is considered a hint and will be followed at the systems discretion.
+ * Get the clock selection thread condition attribute.
*
- * @param level
- * The concurrency level.
+ * @param attribute
+ * The thread condition attribute.
+ * @param id
+ * The clock ID.
*
* @return
* F_none on success.
*
* F_failure (with error bit) on any other error.
*
- * @see pthread_setconcurrency()
+ * @see pthread_condattr_getclock()
*/
-#ifndef _di_f_thread_attribute_concurrency_set_
- extern f_status_t f_thread_attribute_concurrency_set(const int level);
-#endif // _di_f_thread_attribute_concurrency_set_
+#ifndef _di_f_thread_condition_attribute_clock_get_
+ extern f_status_t f_thread_condition_attribute_clock_get(const f_thread_condition_attribute_t * const attribute, clockid_t * const id);
+#endif // _di_f_thread_condition_attribute_clock_get_
/**
- * Initialize a attribute.
+ * Set the clock selection thread condition attribute.
*
+ * @param id
+ * The clock ID.
* @param attribute
- * The attribute to set.
- * This assigns the default to the attribute.
+ * The thread condition attribute.
*
* @return
* F_none on success.
*
* F_failure (with error bit) on any other error.
*
- * @see pthread_condattr_init()
+ * @see pthread_condattr_setclock()
*/
-#ifndef _di_f_thread_condition_attribute_create_
- extern f_status_t f_thread_condition_attribute_create(f_thread_condition_attribute_t * const attribute);
-#endif // _di_f_thread_condition_attribute_create_
+#ifndef _di_f_thread_condition_attribute_clock_set_
+ extern f_status_t f_thread_condition_attribute_clock_set(const clockid_t id, f_thread_condition_attribute_t * const attribute);
+#endif // _di_f_thread_condition_attribute_clock_set_
/**
* Delete a thread attribute.
#endif // _di_f_thread_condition_attribute_delete_
/**
+ * Get the process shared thread condition attribute.
+ *
+ * @param attribute
+ * The thread condition attribute.
+ * @param shared
+ * The process shared attribute value.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * F_failure (with error bit) on any other error.
+ *
+ * @see pthread_condattr_getpshared()
+ */
+#ifndef _di_f_thread_condition_attribute_shared_get_
+ extern f_status_t f_thread_condition_attribute_shared_get(const f_thread_condition_attribute_t * const attribute, int * const shared);
+#endif // _di_f_thread_condition_attribute_shared_get_
+
+/**
+ * Set the process shared thread condition attribute.
+ *
+ * @param shared
+ * The process shared attribute value.
+ * @param attribute
+ * The thread condition attribute.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * F_failure (with error bit) on any other error.
+ *
+ * @see pthread_condattr_setpshared()
+ */
+#ifndef _di_f_thread_condition_attribute_shared_set_
+ extern f_status_t f_thread_condition_attribute_shared_set(const int shared, f_thread_condition_attribute_t * const attribute);
+#endif // _di_f_thread_condition_attribute_shared_set_
+
+/**
* Initialize a condition.
*
* @param attribute
#endif // _di_f_thread_condition_delete_
/**
- * Signal all threads waiting on a condition.
+ * Signal a thread waiting on a condition.
+ *
+ * Only a single thread waiting on this condition is signaled.
*
* @param condition
* The condition to broadcast the unblock signal to.
*
* F_failure (with error bit) on any other error.
*
- * @see pthread_cond_broadcast()
+ * @see pthread_cond_signal()
*/
-#ifndef _di_f_thread_condition_signal_all_
- extern f_status_t f_thread_condition_signal_all(f_thread_condition_t * const condition);
-#endif // _di_f_thread_condition_signal_all_
+#ifndef _di_f_thread_condition_signal_
+ extern f_status_t f_thread_condition_signal(f_thread_condition_t * const condition);
+#endif // _di_f_thread_condition_signal_
/**
- * Signal a thread waiting on a condition.
- *
- * Only a single thread waiting on this condition is signaled.
+ * Signal all threads waiting on a condition.
*
* @param condition
* The condition to broadcast the unblock signal to.
*
* F_failure (with error bit) on any other error.
*
- * @see pthread_cond_signal()
+ * @see pthread_cond_broadcast()
*/
-#ifndef _di_f_thread_condition_signal_
- extern f_status_t f_thread_condition_signal(f_thread_condition_t * const condition);
-#endif // _di_f_thread_condition_signal_
+#ifndef _di_f_thread_condition_signal_all_
+ extern f_status_t f_thread_condition_signal_all(f_thread_condition_t * const condition);
+#endif // _di_f_thread_condition_signal_all_
/**
* Wait until condition is triggered.
* @see pthread_rwlock_timedrdlock()
*/
#ifndef _di_f_thread_lock_read_timed_
- extern f_status_t f_thread_lock_read_timed(const struct timespec *timeout, f_thread_lock_t * const lock);
+ extern f_status_t f_thread_lock_read_timed(const struct timespec * const timeout, f_thread_lock_t * const lock);
#endif // _di_f_thread_lock_read_timed_
/**
* @see pthread_rwlock_timedwrlock()
*/
#ifndef _di_f_thread_lock_write_timed_
- extern f_status_t f_thread_lock_write_timed(const struct timespec *timeout, f_thread_lock_t * const lock);
+ extern f_status_t f_thread_lock_write_timed(const struct timespec * const timeout, f_thread_lock_t * const lock);
#endif // _di_f_thread_lock_write_timed_
/**
#endif // _di_f_thread_mutex_attribute_priority_ceiling_set_
/**
+ * Get the mutex attribute protocol.
+ *
+ * @param attribute
+ * The thread mutex attribute.
+ * @param protocol
+ * The protocol.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_prohibited (with error bit) if not allowed to perform the operation.
+ *
+ * F_failure (with error bit) on any other error.
+ *
+ * @see pthread_mutexattr_getprotocol()
+ */
+#ifndef _di_f_thread_mutex_attribute_protocol_get_
+ extern f_status_t f_thread_mutex_attribute_protocol_get(const f_thread_mutex_attribute_t * const attribute, int * const protocol);
+#endif // _di_f_thread_mutex_attribute_protocol_get_
+
+/**
+ * Set the mutex attribute protocol.
+ *
+ * @param protocol
+ * The protocol.
+ * @param attribute
+ * The thread mutex attribute.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_prohibited (with error bit) if not allowed to perform the operation.
+ * F_supported_not (with error bit) if the protocol is not supported.
+ *
+ * F_failure (with error bit) on any other error.
+ *
+ * @see pthread_mutexattr_setprotocol()
+ */
+#ifndef _di_f_thread_mutex_attribute_protocol_set_
+ extern f_status_t f_thread_mutex_attribute_protocol_set(const int protocol, f_thread_mutex_attribute_t * const attribute);
+#endif // _di_f_thread_mutex_attribute_protocol_set_
+
+/**
* Get the mutex attribute process shared thread attribute.
*
* @param attribute
#endif // _di_f_thread_mutex_attribute_type_set_
/**
- * Get the mutex attribute protocol.
- *
- * @param attribute
- * The thread mutex attribute.
- * @param protocol
- * The protocol.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- * F_prohibited (with error bit) if not allowed to perform the operation.
- *
- * F_failure (with error bit) on any other error.
- *
- * @see pthread_mutexattr_getprotocol()
- */
-#ifndef _di_f_thread_mutex_attribute_protocol_get_
- extern f_status_t f_thread_mutex_attribute_protocol_get(const f_thread_mutex_attribute_t * const attribute, int * const protocol);
-#endif // _di_f_thread_mutex_attribute_protocol_get_
-
-/**
- * Set the mutex attribute protocol.
- *
- * @param protocol
- * The protocol.
- * @param attribute
- * The thread mutex attribute.
- *
- * @return
- * F_none on success.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- * F_prohibited (with error bit) if not allowed to perform the operation.
- * F_supported_not (with error bit) if the protocol is not supported.
- *
- * F_failure (with error bit) on any other error.
- *
- * @see pthread_mutexattr_setprotocol()
- */
-#ifndef _di_f_thread_mutex_attribute_protocol_set_
- extern f_status_t f_thread_mutex_attribute_protocol_set(const int protocol, f_thread_mutex_attribute_t * const attribute);
-#endif // _di_f_thread_mutex_attribute_protocol_set_
-
-/**
* Create a thread mutex.
*
* @param attribute
* @see pthread_mutex_timedlock()
*/
#ifndef _di_f_thread_mutex_lock_timed_
- extern f_status_t f_thread_mutex_lock_timed(const struct timespec *timeout, f_thread_mutex_t * const mutex);
+ extern f_status_t f_thread_mutex_lock_timed(const struct timespec * const timeout, f_thread_mutex_t * const mutex);
#endif // _di_f_thread_mutex_lock_timed_
/**
* @see sem_timedwait()
*/
#ifndef _di_f_thread_semaphore_lock_timed_
- extern f_status_t f_thread_semaphore_lock_timed(const struct timespec *timeout, f_thread_semaphore_t * const semaphore);
+ extern f_status_t f_thread_semaphore_lock_timed(const struct timespec * const timeout, f_thread_semaphore_t * const semaphore);
#endif // _di_f_thread_semaphore_lock_timed_
/**