# ubthread.h File Reference

`#include <ubixos/types.h>`
`#include <ubixos/sched.h>`
`#include <ubixos/time.h>`

Go to the source code of this file.

## Data Structures

struct | ubthread
struct | ubthread_cond
struct | ubthread_cond_list
struct | ubthread_list
struct | ubthread_mutex
struct | ubthread_mutex_list

## Defines

#define | ETIMEDOUT -1
#define | LOCKED 1
#define | UNLOCKED 0

## Typedefs

typedef ubthread * | ubthread_t
typedef ubthread_cond * | ubthread_cond_t
typedef ubthread_mutex * | ubthread_mutex_t

## Functions

kTask_t * | ubthread_self ()
int | ubthread_cond_init (ubthread_cond_t *cond, const uInt32 attr)
int | ubthread_mutex_init (ubthread_mutex_t *mutex, const uInt32 attr)
int | ubthread_cond_destroy (ubthread_cond_t *cond)
int | ubthread_mutex_destroy (ubthread_mutex_t *mutex)
int | ubthread_create (kTask_t **thread, const uInt32 *attr, void *start_routine, void *arg)
int | ubthread_mutex_lock (ubthread_mutex_t *mutex)
int | ubthread_mutex_unlock (ubthread_mutex_t *mutex)
int | ubthread_cond_timedwait (ubthread_cond_t *cond, ubthread_mutex_t *mutex, const struct timespec *abstime)
int | ubthread_cond_wait (ubthread_cond_t *cond, ubthread_mutex_t *mutex)
int | ubthread_cond_signal (ubthread_cond_t *cond)

## Define Documentation

#define ETIMEDOUT -1

#define LOCKED 1

#define UNLOCKED 0

## Typedef Documentation

typedef struct ubthread_cond* ubthread_cond_t

typedef struct ubthread_mutex* ubthread_mutex_t

typedef struct ubthread* ubthread_t

## Function Documentation

int ubthread_cond_destroy | ( | ubthread_cond_t * | cond | ) |

int ubthread_cond_init | ( | ubthread_cond_t * | cond,
|  | const uInt32 | attr
| ) |

int ubthread_cond_signal | ( | ubthread_cond_t * | cond | ) |

int ubthread_cond_timedwait | ( | ubthread_cond_t * | cond,
|  | ubthread_mutex_t * | mutex,
|  | const struct timespec * | abstime
| ) |

int ubthread_cond_wait | ( | ubthread_cond_t * | cond,
|  | ubthread_mutex_t * | mutex
| ) |

int ubthread_create | ( | kTask_t ** | thread,
|  | const uInt32 * | attr,
|  | void * | start_routine,
|  | void * | arg
| ) |

int ubthread_mutex_destroy | ( | ubthread_mutex_t * | mutex | ) |

int ubthread_mutex_init | ( | ubthread_mutex_t * | mutex,
|  | const uInt32 | attr
| ) |

int ubthread_mutex_lock | ( | ubthread_mutex_t * | mutex | ) |

int ubthread_mutex_unlock | ( | ubthread_mutex_t * | mutex | ) |

kTask_t* ubthread_self | ( |  | ) |