diff options
| author | Patrick Williams <iawillia@us.ibm.com> | 2010-06-11 21:40:31 -0500 |
|---|---|---|
| committer | Patrick Williams <iawillia@us.ibm.com> | 2010-06-11 21:40:31 -0500 |
| commit | 24e81bc664f5cdbfc8be1badf00b025ec122af00 (patch) | |
| tree | 2d41e3305fb903024541d105dfec6adf1824839a /src/include/sys | |
| parent | 165e6bed506f9fddd7e9da8ad1f4c7f186e29b00 (diff) | |
| download | talos-hostboot-24e81bc664f5cdbfc8be1badf00b025ec122af00.tar.gz talos-hostboot-24e81bc664f5cdbfc8be1badf00b025ec122af00.zip | |
Add mutex userspace / syscalls.
Diffstat (limited to 'src/include/sys')
| -rw-r--r-- | src/include/sys/mutex.h | 20 | ||||
| -rw-r--r-- | src/include/sys/task.h | 8 |
2 files changed, 25 insertions, 3 deletions
diff --git a/src/include/sys/mutex.h b/src/include/sys/mutex.h new file mode 100644 index 000000000..3eca65f06 --- /dev/null +++ b/src/include/sys/mutex.h @@ -0,0 +1,20 @@ +#ifndef __SYS_MUTEX_H +#define __SYS_MUTEX_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef void* mutex_t; + +mutex_t mutex_create(); +int mutex_destroy(mutex_t); + +int mutex_lock(mutex_t); +int mutex_unlock(mutex_t); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/include/sys/task.h b/src/include/sys/task.h index 84ddb10f9..fa9838723 100644 --- a/src/include/sys/task.h +++ b/src/include/sys/task.h @@ -1,18 +1,20 @@ #ifndef __SYS_TASK_H #define __SYS_TASK_H -#include <sys/syscall.h> +#include <stdint.h> #ifdef __cplusplus extern "C" { #endif +typedef uint64_t tid_t; + void task_yield(); -int task_create(void(*)(void*), void*); +tid_t task_create(void(*)(void*), void*); void task_end(); -uint64_t task_gettid(); +tid_t task_gettid(); #ifdef __cplusplus } |

