UbixOS V2
2.0
sys_arch.h
Go to the documentation of this file.
1
#ifndef __ARCH_SYS_ARCH_H__
2
#define __ARCH_SYS_ARCH_H__
3
4
#include <
ubixos/ubthread.h
>
5
#include <
ubixos/sem.h
>
6
7
#define SYS_MBOX_NULL NULL
8
#define SYS_SEM_NULL NULL
9
#define SYS_MBOX_SIZE 100
10
11
/* Structs */
12
struct
sys_timeouts
{
13
struct
sys_timeout *
next
;
14
};
15
16
struct
sys_mutex
{
17
ubthread_mutex_t
mutex
;
18
};
19
20
typedef
struct
sys_mutex
sys_mutex_t
;
21
22
struct
sys_mbox
{
23
uint32_t
head
;
24
uint32_t
tail
;
25
26
//MrOlsen (2017-12-28) - This will break because size is passable
27
void
*
msgs
[
SYS_MBOX_SIZE
];
28
29
//struct ubthread_mutex *lock;
30
31
struct
sys_sem
*
empty
;
32
struct
sys_sem
*
full
;
33
struct
sys_sem
*
lock
;
34
35
int
wait_send
;
36
37
//void **queue;
38
//uint32_t size;
39
};
40
41
typedef
struct
sys_mbox
sys_mbox_t
;
42
43
struct
sys_thread
{
44
struct
sys_thread
*
next
;
45
struct
sys_timeouts
timeouts
;
46
kTask_t
*
ubthread
;
47
char
name
[128];
48
};
49
50
typedef
struct
sys_thread
*
sys_thread_t
;
51
52
53
#endif
taskStruct
Definition:
sched.h:62
sys_mbox::wait_send
int wait_send
Definition:
sys_arch.h:35
ubthread_mutex
Definition:
ubthread.h:52
sys_timeouts::next
struct sys_timeout * next
Definition:
sys_arch.h:13
sem.h
sys_mbox::msgs
void * msgs[100]
Definition:
sys_arch.h:27
sys_mbox::lock
struct sys_sem * lock
Definition:
sys_arch.h:33
sys_thread
Definition:
sys_arch.h:43
sys_timeouts
Definition:
sys_arch.h:12
sys_sem
Definition:
sem.h:36
SYS_MBOX_SIZE
#define SYS_MBOX_SIZE
Definition:
sys_arch.h:9
sys_thread_t
struct sys_thread * sys_thread_t
Definition:
sys_arch.h:50
sys_mbox::empty
struct sys_sem * empty
Definition:
sys_arch.h:31
sys_thread::timeouts
struct sys_timeouts timeouts
Definition:
sys_arch.h:45
ubthread.h
sys_mbox::full
struct sys_sem * full
Definition:
sys_arch.h:32
sys_thread::name
char name[128]
Definition:
sys_arch.h:47
uint32_t
__uint32_t uint32_t
Definition:
types.h:46
sys_thread::ubthread
kTask_t * ubthread
Definition:
sys_arch.h:46
sys_mbox::head
uint32_t head
Definition:
sys_arch.h:23
sys_thread::next
struct sys_thread * next
Definition:
sys_arch.h:44
sys_mutex::mutex
ubthread_mutex_t mutex
Definition:
sys_arch.h:17
sys_mbox::tail
uint32_t tail
Definition:
sys_arch.h:24
sys_mutex
Definition:
sys_arch.h:16
sys_mbox
Definition:
sys_arch.h:22
C:
Dev
git
UbixOS
sys
include
net
arch
sys_arch.h
Generated by
1.8.16