version 1.1.1.1, 2008/06/03 10:38:46 |
version 1.1.1.1.2.1, 2008/08/13 17:12:33 |
|
|
/* |
/* |
* Create and initialize a condition variable (CV). |
* Create and initialize a condition variable (CV). |
* |
* |
* If an initialized condition variable is reinitialized, undefined |
* If an initialized condition variable is reinitialized, |
* behavior results. |
* undefined behavior results. |
*/ |
*/ |
int |
int |
cond_init(cond_t *cond) |
cond_init(cond_t *cond) |
|
|
|
|
/* |
/* |
* cond_copyin - copy a condition variable from user space. |
* cond_copyin - copy a condition variable from user space. |
* @uc: pointer to cv in user space. |
|
* @kc: pointer to cv in kernel space. |
|
* |
* |
* It also checks if the passed CV is valid. |
* It also checks if the passed CV is valid. |
*/ |
*/ |
|
|
|
|
/* |
/* |
* Destroy a condition variable. |
* Destroy a condition variable. |
* If there are any blocked thread waiting for the specified CV, |
* |
* it returns EBUSY. |
* If there are any blocked thread waiting for the specified |
|
* CV, it returns EBUSY. |
*/ |
*/ |
int |
int |
cond_destroy(cond_t *cond) |
cond_destroy(cond_t *cond) |
|
|
* If the thread receives any exception while waiting CV, this |
* If the thread receives any exception while waiting CV, this |
* routine returns immediately with EINTR in order to invoke |
* routine returns immediately with EINTR in order to invoke |
* exception handler. However, an application assumes this call |
* exception handler. However, an application assumes this call |
* does NOT return with an error. So, the stub routine in a system |
* does NOT return with an error. So, the stub routine in a |
* call library must call cond_wait() again if it gets EINTR as error. |
* system call library must call cond_wait() again if it gets |
|
* EINTR as error. |
*/ |
*/ |
int |
int |
cond_wait(cond_t *cond, mutex_t *mtx) |
cond_wait(cond_t *cond, mutex_t *mtx) |