Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
Data Structures | Enumerations | Functions | Variables
tenok.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>
#include "kconfig.h"
Include dependency graph for tenok.h:

Go to the source code of this file.

Data Structures

struct  thread_stat
 

Enumerations

enum  { PAGE_TOTAL_SIZE = 0 , PAGE_FREE_SIZE = 1 , HEAP_TOTAL_SIZE = 2 , HEAP_FREE_SIZE = 3 }
 

Functions

void sched_start (void)
 Start the operating system. More...
 
void * thread_info (struct thread_stat *info, void *next)
 Get the thread information iteratively. More...
 
void setprogname (const char *name)
 Set the name of the running thread. More...
 
int delay_ticks (uint32_t ticks)
 To cause the calling thread to sleep for the given ticks. More...
 
int minfo (int name)
 Get memory information of the system. More...
 

Variables

enum { ... }  MINFO_NAMES
 

Function Documentation

◆ delay_ticks()

int delay_ticks ( uint32_t  ticks)

To cause the calling thread to sleep for the given ticks.

Parameters
ticksThe ticks of time to sleep
Return values
int0 on success and nonzero error number on error.

◆ minfo()

int minfo ( int  name)

Get memory information of the system.

Parameters
nameThe information to acquire (check MINFO_NAMES).
Return values
intFor returning the acquired information.

◆ sched_start()

void sched_start ( void  )

Start the operating system.

Parameters
None
Return values
None

◆ setprogname()

void setprogname ( const char *  name)

Set the name of the running thread.

Parameters
nameThe name of the program.
Return values
None

◆ thread_info()

void* thread_info ( struct thread_stat info,
void *  next 
)

Get the thread information iteratively.

Parameters
infoFor returning thread information.
nextThe pointer to the the next thread. The initial argument should be set with NULL.
Return values
void*: The pointer to the next thread. The function returns NULL if next thread does not exist.