Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
tenok.h
Go to the documentation of this file.
1 
4 #ifndef __TENOK_H__
5 #define __TENOK_H__
6 
7 #include <stdbool.h>
8 #include <stddef.h>
9 #include <stdint.h>
10 #include <sys/types.h>
11 
12 #include "kconfig.h"
13 
14 struct thread_stat {
15  int pid;
16  int tid;
17  int priority;
18  char *status;
19  bool kernel_thread;
20  size_t stack_usage;
21  size_t stack_size;
22  char name[THREAD_NAME_MAX];
23 };
24 
25 enum {
26  PAGE_TOTAL_SIZE = 0,
27  PAGE_FREE_SIZE = 1,
28  HEAP_TOTAL_SIZE = 2,
29  HEAP_FREE_SIZE = 3
30 } MINFO_NAMES;
31 
37 void sched_start(void);
38 
47 void *thread_info(struct thread_stat *info, void *next);
48 
54 void setprogname(const char *name);
55 
61 int delay_ticks(uint32_t ticks);
62 
68 int minfo(int name);
69 
70 #endif
Definition: tenok.h:14
void * thread_info(struct thread_stat *info, void *next)
Get the thread information iteratively.
Definition: task.c:8
int delay_ticks(uint32_t ticks)
To cause the calling thread to sleep for the given ticks.
Definition: sched.c:35
void sched_start(void)
Start the operating system.
Definition: kernel.c:3298
int minfo(int name)
Get memory information of the system.
Definition: mm.c:205
void setprogname(const char *name)
Set the name of the running thread.
Definition: task.c:13