UbixOS  2.0
sys_arch.c File Reference
#include <sys/types.h>
#include <ubixos/sched.h>
#include <ubixos/ubthread.h>
#include <ubixos/kpanic.h>
#include <lib/kprintf.h>
#include <lib/kmalloc.h>
#include <sys/sysproto_posix.h>
#include <sys/descrip.h>
#include "net/debug.h"
#include "net/sys.h"
#include "net/opt.h"
#include "net/stats.h"
#include <net/arch/sys_arch.h>
#include <ubixos/spinlock.h>
#include <ubixos/sem.h>
Include dependency graph for sys_arch.c:

Go to the source code of this file.

Data Structures

struct  thread_start_param
 

Macros

#define ERR_NOT_READY   0
 
#define ERR_TIMED_OUT   1
 
#define INFINITE_TIME   0
 

Functions

uint32_t sys_arch_mbox_fetch (struct sys_mbox **mb, void **msg, uint32_t timeout)
 
uint32_t sys_arch_mbox_tryfetch (struct sys_mbox **mb, void **msg)
 
uint32_t sys_arch_sem_wait (struct sys_sem **s, uint32_t timeout)
 
struct sys_timeoutssys_arch_timeouts (void)
 
void sys_init ()
 
void sys_mbox_free (struct sys_mbox **mb)
 
err_t sys_mbox_new (struct sys_mbox **mb, int size)
 
void sys_mbox_post (struct sys_mbox **mb, void *msg)
 
void sys_mbox_set_invalid (struct sys_mbox **mb)
 
err_t sys_mbox_trypost (struct sys_mbox **mb, void *msg)
 
int sys_mbox_valid (struct sys_mbox **mb)
 
void sys_mutex_free (sys_mutex_t *mutex)
 
void sys_mutex_lock (sys_mutex_t *mutex)
 
err_t sys_mutex_new (sys_mutex_t *mutex)
 
void sys_mutex_unlock (sys_mutex_t *mutex)
 
uint32_t sys_now ()
 
void sys_sem_free (struct sys_sem **sem)
 
err_t sys_sem_new (sys_sem_t **sem, uint8_t count)
 
void sys_sem_set_invalid (struct sys_sem **s)
 
void sys_sem_signal (struct sys_sem **s)
 
int sys_sem_valid (struct sys_sem **s)
 
int sys_sendto (struct thread *td, struct sys_sendto_args *args)
 
int sys_setsockopt (struct thread *td, struct sys_setsockopt_args *args)
 
int sys_socket (struct thread *td, struct sys_socket_args *args)
 
sys_thread_t sys_thread_new (const char *name, void(*thread)(void *arg), void *arg, int stacksize, int prio)
 
unsigned long sys_unix_now ()
 

Macro Definition Documentation

◆ ERR_NOT_READY

#define ERR_NOT_READY   0

Definition at line 20 of file sys_arch.c.

◆ ERR_TIMED_OUT

#define ERR_TIMED_OUT   1

Definition at line 21 of file sys_arch.c.

◆ INFINITE_TIME

#define INFINITE_TIME   0

Definition at line 22 of file sys_arch.c.

Function Documentation

◆ sys_arch_timeouts()

struct sys_timeouts* sys_arch_timeouts ( void  )

Definition at line 476 of file sys_arch.c.

◆ sys_init()

void sys_init ( void  )

Definition at line 32 of file sys_arch.c.

References gettimeofday().

Referenced by lwip_init().

Here is the call graph for this function:

◆ sys_sendto()

int sys_sendto ( struct thread td,
struct sys_sendto_args args 
)

◆ sys_setsockopt()

int sys_setsockopt ( struct thread td,
struct sys_setsockopt_args args 
)

◆ sys_socket()

int sys_socket ( struct thread td,
struct sys_socket_args args 
)

Definition at line 500 of file sys_arch.c.

References sys_socket_args::domain, falloc(), file::fd, file::fd_type, fdestroy(), kprintf(), sys_socket_args::protocol, file::socket, thread::td_retval, and sys_socket_args::type.

Here is the call graph for this function:

◆ sys_unix_now()

unsigned long sys_unix_now ( )

Definition at line 482 of file sys_arch.c.

References gettimeofday(), and timeval::tv_sec.

Referenced by sys_now().

Here is the call graph for this function: