Files | |
file | align.h |
file | as.h |
file | assert.h |
file | async.h |
file | include/atomic.h |
file | cap.h |
file | ctype.h |
file | ddi.h |
file | include/endian.h |
file | err.h |
file | errno.h |
file | futex.h |
file | io.h |
file | printf_core.h |
file | stream.h |
file | fifo.h |
file | hash_table.h |
file | list.h |
file | libc.h |
file | include/limits.h |
file | include/psthread.h |
file | stdarg.h |
file | stddef.h |
file | stdint.h |
file | stdio.h |
file | stdlib.h |
file | string.h |
file | mman.h |
file | sys/time.h |
file | include/sys/types.h |
file | sysinfo.h |
file | task.h |
file | include/thread.h |
file | time.h |
file | unistd.h |
file | as.c |
file | async.c |
file | cap.c |
Functions to grant/revoke capabilities to/from a task. | |
file | ddi.c |
file | err.c |
file | futex.c |
file | io.c |
file | printf.c |
file | printf_core.c |
Printing functions. | |
file | snprintf.c |
file | sprintf.c |
file | stream.c |
file | vprintf.c |
file | vsnprintf.c |
file | vsprintf.c |
file | hash_table.c |
file | list.c |
file | libc.c |
file | mmap.c |
file | psthread.c |
file | stdlib.c |
file | string.c |
file | sysinfo.c |
file | task.c |
file | generic/thread.c |
file | time.c |
Modules | |
IPC | |
HelenOS uspace IPC. | |
malloc | |
Malloc originally written by Doug Lea and ported to HelenOS. | |
Data Structures | |
struct | atomic |
struct | printf_spec |
struct | hash_table |
struct | hash_table_operations |
struct | link |
struct | psthread_data |
struct | timeval |
struct | timezone |
struct | awaiter_t |
struct | amsg_t |
struct | msg_t |
struct | connection_t |
struct | stream_t |
struct | vsnprintf_data |
struct | along |
Defines | |
#define | ALIGN_DOWN(s, a) ((s) & ~((a) - 1)) |
#define | ALIGN_UP(s, a) ((long)((s) + ((a) - 1)) & ~((long) (a) - 1)) |
#define | USER_ADDRESS_SPACE_SIZE_ARCH (USER_ADDRESS_SPACE_END_ARCH-USER_ADDRESS_SPACE_START_ARCH+1) |
#define | assert(expr) if (!(expr)) { printf("Assertion failed (%s) at file '%s', line %d.\n", #expr, __FILE__, __LINE__); abort();} |
#define | async_req(phoneid, method, arg1, r1) async_req_2(phoneid, method, arg1, 0, r1, 0) |
#define | async_msg(ph, m, a1) async_msg_2(ph,m,a1,0) |
#define | __LITTLE_ENDIAN 1234 |
#define | __BIG_ENDIAN 4321 |
#define | __PDP_ENDIAN 3412 |
#define | errx(status, fmt,) |
#define | FUTEX_INITIALIZER {1} |
#define | EMFILE -17 |
#define | FIFO_CREATE_STATIC(name, t, itms) |
#define | FIFO_INITIALIZE_STATIC(name, t, itms) |
#define | FIFO_INITIALIZE_DYNAMIC(name, t, itms) |
#define | fifo_pop(name) name.fifo[name.head = (name.head + 1) < name.items ? (name.head + 1) : 0] |
#define | fifo_push(name, value) name.fifo[name.tail = (name.tail + 1) < name.items ? (name.tail + 1) : 0] = (value) |
#define | fifo_create(name) name.fifo = malloc(sizeof(*name.fifo) * name.items) |
#define | hash_table_get_instance(item, type, member) list_get_instance((item), type, member) |
#define | true 1 |
#define | false 0 |
#define | LIST_INITIALIZE(name) link_t name = { .prev = &name, .next = &name } |
#define | list_get_instance(link, type, member) (type *)(((char *)(link))-((char *)&(((type *)NULL)->member))) |
#define | __SYSCALL0(id) __syscall(0, 0, 0, 0, id) |
#define | __SYSCALL1(id, p1) __syscall(p1, 0, 0, 0, id) |
#define | __SYSCALL2(id, p1, p2) __syscall(p1, p2, 0, 0, id) |
#define | __SYSCALL3(id, p1, p2, p3) __syscall(p1, p2, p3, 0, id) |
#define | __SYSCALL4(id, p1, p2, p3, p4) __syscall(p1, p2, p3, p4, id) |
#define | SCHAR_MIN MIN_INT8 |
#define | SCHAR_MAX MAX_INT8 |
#define | UCHAR_MIN MIN_UINT8 |
#define | UCHAR_MAX MAX_UINT8 |
#define | CHAR_MIN SCHAR_MIN |
#define | CHAR_MAX SCHAR_MAX |
#define | SHRT_MIN MIN_INT16 |
#define | SHRT_MAX MAX_INT16 |
#define | USHRT_MIN MIN_UINT16 |
#define | USHRT_MAX MAX_UINT16 |
#define | INT_MIN MIN_INT32 |
#define | INT_MAX MAX_INT32 |
#define | UINT_MIN MIN_UINT32 |
#define | UINT_MAX MAX_UINT32 |
#define | LLONG_MIN MIN_INT64 |
#define | LLONG_MAX MAX_INT64 |
#define | ULLONG_MIN MIN_UINT64 |
#define | ULLONG_MAX MAX_UINT64 |
#define | context_set(c, _pc, stack, size, ptls) |
#define | PSTHREAD_SERIALIZED 1 |
#define | va_start(ap, last) __builtin_va_start(ap, last) |
#define | va_arg(ap, type) __builtin_va_arg(ap, type) |
#define | va_end(ap) __builtin_va_end(ap) |
#define | MAX_INT8 (0x7F) |
#define | MIN_INT8 (0x80) |
#define | MAX_UINT8 (0xFFu) |
#define | MIN_UINT8 (0u) |
#define | MAX_INT16 (0x7FFF) |
#define | MIN_INT16 (0x8000) |
#define | MAX_UINT16 (0xFFFFu) |
#define | MIN_UINT16 (0u) |
#define | MAX_INT32 (0x7FFFFFFF) |
#define | MIN_INT32 (0x80000000) |
#define | MAX_UINT32 (0xFFFFFFFFu) |
#define | MIN_UINT32 (0u) |
#define | MAX_INT64 (0x7FFFFFFFFFFFFFFFll) |
#define | MIN_INT64 (0x8000000000000000ll) |
#define | MAX_UINT64 (0xFFFFFFFFFFFFFFFFull) |
#define | MIN_UINT64 (0ull) |
#define | EOF (-1) |
#define | fprintf(f, fmt,) printf(fmt, ##__VA_ARGS__) |
#define | abort() _exit(1) |
#define | exit(status) _exit((status)) |
#define | RAND_MAX 714025 |
#define | bzero(ptr, len) memset((ptr), 0, (len)) |
#define | MAP_FAILED ((void *) -1) |
#define | MAP_SHARED (1 << 0) |
#define | MAP_PRIVATE (1 << 1) |
#define | MAP_FIXED (1 << 2) |
#define | MAP_ANONYMOUS (1 << 3) |
#define | PROTO_READ AS_AREA_READ |
#define | PROTO_WRITE AS_AREA_WRITE |
#define | PROTO_EXEC AS_AREA_EXEC |
#define | DST_NONE 0 |
#define | NULL 0 |
#define | getpagesize() (PAGE_SIZE) |
#define | CONN_HASH_TABLE_CHAINS 32 |
#define | __PRINTF_FLAG_PREFIX 0x00000001 |
#define | __PRINTF_FLAG_SIGNED 0x00000002 |
#define | __PRINTF_FLAG_ZEROPADDED 0x00000004 |
#define | __PRINTF_FLAG_LEFTALIGNED 0x00000010 |
#define | __PRINTF_FLAG_SHOWPLUS 0x00000020 |
#define | __PRINTF_FLAG_SPACESIGN 0x00000040 |
#define | __PRINTF_FLAG_BIGCHARS 0x00000080 |
#define | __PRINTF_FLAG_NEGATIVE 0x00000100 |
#define | PRINT_NUMBER_BUFFER_SIZE (64+5) |
#define | FDS 32 |
#define | PSTHREAD_INITIAL_STACK_PAGES_NO 1 |
#define | THREAD_INITIAL_STACK_PAGES_NO 1 |
Typedefs | |
typedef ipc_callid_t | aid_t |
typedef void(* | async_client_conn_t )(ipc_callid_t callid, ipc_call_t *call) |
typedef atomic | atomic_t |
typedef int | fd_t |
typedef ssize_t(* | pwritefn_t )(void *, const void *, size_t) |
typedef ssize_t(* | preadfn_t )(void *, void *, size_t) |
typedef unsigned long | fifo_count_t |
typedef unsigned long | fifo_index_t |
typedef unsigned long | hash_count_t |
typedef unsigned long | hash_index_t |
typedef hash_table | hash_table_t |
typedef hash_table_operations | hash_table_operations_t |
typedef link | link_t |
typedef sysarg_t | pstid_t |
typedef psthread_data | psthread_data_t |
typedef __builtin_va_list | va_list |
typedef long | time_t |
typedef long | suseconds_t |
typedef uint64_t | task_id_t |
Enumerations | |
enum | pschange_type { PS_TO_MANAGER, PS_FROM_MANAGER, PS_PREEMPT, PS_FROM_DEAD } |
enum | qualifier_t { PrintfQualifierByte = 0, PrintfQualifierShort, PrintfQualifierInt, PrintfQualifierLong, PrintfQualifierLongLong, PrintfQualifierSizeT, PrintfQualifierPointer } |
Functions | |
void * | as_area_create (void *address, size_t size, int flags) |
int | as_area_resize (void *address, size_t size, int flags) |
int | as_area_destroy (void *address) |
void * | set_maxheapsize (size_t mhs) |
void * | as_get_mappable_page (size_t sz) |
static void | async_manager (void) |
ipc_callid_t | async_get_call_timeout (ipc_call_t *call, suseconds_t usecs) |
static ipc_callid_t | async_get_call (ipc_call_t *data) |
aid_t | async_send_2 (int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, ipc_call_t *dataptr) |
aid_t | async_send_3 (int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipc_call_t *dataptr) |
void | async_wait_for (aid_t amsgid, ipcarg_t *result) |
int | async_wait_timeout (aid_t amsgid, ipcarg_t *retval, suseconds_t timeout) |
static ipcarg_t | async_req_2 (int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t *r1, ipcarg_t *r2) |
static ipcarg_t | async_req_3 (int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipcarg_t *r1, ipcarg_t *r2, ipcarg_t *r3) |
pstid_t | async_new_connection (ipcarg_t in_phone_hash, ipc_callid_t callid, ipc_call_t *call, void(*cthread)(ipc_callid_t, ipc_call_t *)) |
void | async_usleep (suseconds_t timeout) |
void | async_create_manager (void) |
void | async_destroy_manager (void) |
void | async_set_client_connection (async_client_conn_t conn) |
void | async_set_interrupt_received (async_client_conn_t conn) |
int | _async_init (void) |
void | async_msg_3 (int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3) |
void | async_msg_2 (int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2) |
static void | async_serialize_start (void) |
static void | async_serialize_end (void) |
static void | atomic_set (atomic_t *val, long i) |
static long | atomic_get (atomic_t *val) |
int | cap_grant (task_id_t id, unsigned int caps) |
int | cap_revoke (task_id_t id, unsigned int caps) |
static int | isdigit (int c) |
static int | isspace (int c) |
int | map_physmem (void *pf, void *vp, unsigned long pages, int flags) |
int | iospace_enable (task_id_t id, void *ioaddr, unsigned long size) |
int | preemption_control (int enable) |
void | futex_initialize (atomic_t *futex, int value) |
int | futex_down (atomic_t *futex) |
int | futex_trydown (atomic_t *futex) |
int | futex_down_timeout (atomic_t *futex, uint32_t usec, int flags) |
int | futex_up (atomic_t *futex) |
int | putnchars (const char *buf, size_t count) |
int | putstr (const char *str) |
int | putchar (int c) |
int | getchar (void) |
int | printf_core (const char *fmt, struct printf_spec *ps, va_list ap) |
fd_t | open (const char *fname, int flags) |
int | get_fd_phone (int fd) |
int | hash_table_create (hash_table_t *h, hash_count_t m, hash_count_t max_keys, hash_table_operations_t *op) |
void | hash_table_insert (hash_table_t *h, unsigned long key[], link_t *item) |
link_t * | hash_table_find (hash_table_t *h, unsigned long key[]) |
void | hash_table_remove (hash_table_t *h, unsigned long key[], hash_count_t keys) |
static void | link_initialize (link_t *link) |
static void | list_initialize (link_t *head) |
static void | list_prepend (link_t *link, link_t *head) |
static void | list_append (link_t *link, link_t *head) |
static void | list_remove (link_t *link) |
static int | list_empty (link_t *head) |
static void | headless_list_split_or_concat (link_t *part1, link_t *part2) |
static void | headless_list_split (link_t *part1, link_t *part2) |
static void | headless_list_concat (link_t *part1, link_t *part2) |
int | list_member (const link_t *link, const link_t *head) |
void | list_concat (link_t *head1, link_t *head2) |
void | __main (void) |
void | __io_init (void) |
void | __exit (void) |
sysarg_t | __syscall (const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, const sysarg_t p4, const syscall_t id) |
int | context_save (context_t *c) |
void | context_restore (context_t *c) __attribute__((noreturn)) |
pstid_t | psthread_create (int(*func)(void *), void *arg) |
int | psthread_join (pstid_t psthrid) |
psthread_data_t * | psthread_setup (void) |
void | psthread_teardown (psthread_data_t *pt) |
int | psthread_schedule_next_adv (pschange_type ctype) |
void | psthread_add_ready (pstid_t ptid) |
void | psthread_add_manager (pstid_t psthrid) |
void | psthread_remove_manager (void) |
pstid_t | psthread_get_id (void) |
void | psthread_inc_sercount (void) |
void | psthread_dec_sercount (void) |
static int | psthread_schedule_next () |
int | puts (const char *str) |
int | printf (const char *fmt,...) |
int | sprintf (char *str, const char *fmt,...) |
int | snprintf (char *str, size_t size, const char *fmt,...) |
int | vprintf (const char *fmt, va_list ap) |
int | vsprintf (char *str, const char *fmt, va_list ap) |
int | vsnprintf (char *str, size_t size, const char *fmt, va_list ap) |
long int | random (void) |
void | srandom (unsigned int seed) |
static int | rand (void) |
static void | srand (unsigned int seed) |
void * | memset (void *s, int c, size_t n) |
void * | memcpy (void *dest, const void *src, size_t n) |
void * | memmove (void *dest, const void *src, size_t n) |
int | strcmp (const char *, const char *) |
char * | strcpy (char *dest, const char *src) |
char * | strncpy (char *dest, const char *src, size_t n) |
size_t | strlen (const char *str) |
char * | strchr (const char *str, int c) |
char * | strrchr (const char *str, int c) |
long int | strtol (const char *nptr, char **endptr, int base) |
unsigned long | strtoul (const char *nptr, char **endptr, int base) |
void * | mmap (void *start, size_t length, int prot, int flags, int fd, off_t offset) |
int | munmap (void *start, size_t length) |
int | gettimeofday (struct timeval *tv, struct timezone *tz) |
sysarg_t | sysinfo_value (char *name) |
task_id_t | task_get_id (void) |
void | __thread_entry (void) |
void | __thread_main (uspace_arg_t *uarg) |
int | thread_create (void(*function)(void *arg), void *arg, char *name) |
void | thread_exit (int status) |
tcb_t * | __make_tls (void) |
tcb_t * | __alloc_tls (void **data, size_t size) |
void | __free_tls (tcb_t *) |
void | __free_tls_arch (tcb_t *, size_t size) |
ssize_t | write (int fd, const void *buf, size_t count) |
ssize_t | read (int fd, void *buf, size_t count) |
void | _exit (int status) |
void * | sbrk (ssize_t incr) |
void | usleep (unsigned long usec) |
static | LIST_INITIALIZE (timeout_list) |
static void | default_client_connection (ipc_callid_t callid, ipc_call_t *call) |
static void | default_interrupt_received (ipc_callid_t callid, ipc_call_t *call) |
static void | tv_add (struct timeval *tv, suseconds_t usecs) |
static suseconds_t | tv_sub (struct timeval *tv1, struct timeval *tv2) |
static int | tv_gt (struct timeval *tv1, struct timeval *tv2) |
static int | tv_gteq (struct timeval *tv1, struct timeval *tv2) |
static hash_index_t | conn_hash (unsigned long *key) |
static int | conn_compare (unsigned long key[], hash_count_t keys, link_t *item) |
static void | conn_remove (link_t *item) |
static void | insert_timeout (awaiter_t *wd) |
static int | route_call (ipc_callid_t callid, ipc_call_t *call) |
static int | connection_thread (void *arg) |
static void | handle_call (ipc_callid_t callid, ipc_call_t *call) |
static void | handle_expired_timeouts (void) |
static int | async_manager_worker (void) |
static int | async_manager_thread (void *arg) |
static void | reply_received (void *private, int retval, ipc_call_t *data) |
static int | printf_putnchars (const char *buf, size_t count, struct printf_spec *ps) |
static int | printf_putstr (const char *str, struct printf_spec *ps) |
static int | printf_putchar (int c, struct printf_spec *ps) |
static int | print_char (char c, int width, uint64_t flags, struct printf_spec *ps) |
static int | print_string (char *s, int width, int precision, uint64_t flags, struct printf_spec *ps) |
static int | print_number (uint64_t num, int width, int precision, int base, uint64_t flags, struct printf_spec *ps) |
static ssize_t | write_stderr (void *param, const void *buf, size_t count) |
static ssize_t | read_stdin (void *param, void *buf, size_t count) |
static ssize_t | write_stdout (void *param, const void *buf, size_t count) |
static stream_t | open_stdin (void) |
static stream_t | open_stdout (void) |
static ssize_t | write_null (void *param, const void *buf, size_t count) |
int | vprintf_write (const char *str, size_t count, void *unused) |
int | vsnprintf_write (const char *str, size_t count, struct vsnprintf_data *data) |
static | LIST_INITIALIZE (ready_list) |
static | LIST_INITIALIZE (serialized_list) |
static | LIST_INITIALIZE (manager_list) |
static void | psthread_main (void) |
static void * | unaligned_memcpy (void *dst, const void *src, size_t n) |
static unsigned long | _strtoul (const char *nptr, char **endptr, int base, char *sgn) |
static | LIST_INITIALIZE (thread_garbage) |
int | thread_create (void(*function)(void *), void *arg, char *name) |
Variables | |
atomic_t | async_futex |
static size_t | heapsize = 0 |
static size_t | maxheapsize = (size_t) (-1) |
static void * | last_allocated = 0 |
char | _heap |
atomic_t | async_futex = FUTEX_INITIALIZER |
static hash_table_t | conn_hash_table |
__thread connection_t * | PS_connection |
__thread int | in_interrupt_handler |
static async_client_conn_t | client_connection = default_client_connection |
static async_client_conn_t | interrupt_received = default_interrupt_received |
static hash_table_operations_t | conn_hash_table_ops |
static char | nl = '\n' |
static char | digits_small [] = "0123456789abcdef" |
static char | digits_big [] = "0123456789ABCDEF" |
static int | console_phone = -1 |
static stream_t | streams [FDS] |
char | _heap |
static atomic_t | psthread_futex = FUTEX_INITIALIZER |
static int | serialized_threads |
static __thread int | serialization_count |
static int | threads_in_manager |
static long | glbl_seed = 1 |
along | packed |
char | _tdata_start |
char | _tdata_end |
char | _tbss_start |
char | _tbss_end |
struct { | |
int phone | |
ipcarg_t rows | |
ipcarg_t cols | |
__u8 * fbaddress | |
unsigned int xres | |
unsigned int yres | |
unsigned int scanline | |
unsigned int pixelbytes | |
conv2scr_fn_t rgb2scr | |
conv2rgb_fn_t scr2rgb | |
volatile sysarg_t seconds1 | |
volatile sysarg_t useconds | |
volatile sysarg_t seconds2 | |
} | ktime |
|
Align to the nearest lower address.
Definition at line 43 of file align.h. Referenced by gcons_init(). |
|
Align to the nearest higher address.
Definition at line 51 of file align.h. Referenced by as_get_mappable_page(), and fb_init(). |
|
Definition at line 43 of file as.h. Referenced by as_get_mappable_page(). |
|
Debugging assert macro If NDEBUG is not set, the assert() macro evaluates expr and if it is false prints error message and terminate program.
Definition at line 51 of file assert.h. Referenced by add_segment(), async_get_call_timeout(), conn_hash(), dlmalloc(), hash_table_create(), hash_table_find(), hash_table_insert(), hash_table_remove(), ialloc(), internal_memalign(), mmap_alloc(), ns_compare(), ns_hash(), ns_remove(), prepend_alloc(), release_unused_segments(), and tmalloc_small(). |
|
Definition at line 83 of file async.h. Referenced by main(), make_anim(), make_pixmap(), and switch_screens(). |
|
Definition at line 119 of file async.h. Referenced by clear(), client_connection(), clrscr(), curs_visibility(), draw_pixmap(), gcons_change_console(), gcons_in_kernel(), irq_handler(), make_anim(), make_pixmap(), switch_screens(), vp_switch(), write_char(), and write_stdout(). |
|
Definition at line 38 of file include/endian.h. |
|
Definition at line 39 of file include/endian.h. |
|
Definition at line 40 of file include/endian.h. |
|
Value: |
|
Definition at line 41 of file futex.h. Referenced by usleep(). |
|
Definition at line 40 of file stream.h. Referenced by open(). |
|
Value: struct { \ t fifo[(itms)]; \ fifo_count_t items; \ fifo_index_t head; \ fifo_index_t tail; \ } name |
|
Value: FIFO_CREATE_STATIC(name, t, itms) = { \ .items = (itms), \ .head = 0, \ .tail = 0 \ } FIFO is allocated statically. This macro is suitable for creating smaller FIFOs.
|
|
Value: struct { \ t *fifo; \ fifo_count_t items; \ fifo_index_t head; \ fifo_index_t tail; \ } name = { \ .fifo = NULL, \ .items = (itms), \ .head = 0, \ .tail = 0 \ } FIFO is allocated dynamically. This macro is suitable for creating larger FIFOs.
|
|
Pop value from head of FIFO.
Definition at line 105 of file fifo.h. Referenced by client_connection(), and keyboard_events(). |
|
Push value to tail of FIFO.
Definition at line 114 of file fifo.h. Referenced by client_connection(). |
|
Allocate memory for dynamic FIFO.
|
|
Definition at line 79 of file hash_table.h. Referenced by conn_compare(), conn_remove(), connect_to_service(), ns_compare(), ns_remove(), and route_call(). |
|
|
|
|
|
Declare and initialize statically allocated list.
|
|
Definition at line 186 of file list.h. Referenced by async_get_call_timeout(), async_manager_worker(), connection_thread(), handle_answer(), handle_expired_timeouts(), insert_timeout(), psthread_schedule_next_adv(), and try_dispatch_queued_calls(). |
|
Definition at line 41 of file libc.h. Referenced by change_console(). |
|
Definition at line 42 of file libc.h. Referenced by as_area_destroy(), futex_up(), iospace_enable(), ipc_hangup(), ipc_unregister_irq(), preemption_control(), task_get_id(), and thread_exit(). |
|
Definition at line 43 of file libc.h. Referenced by _ipc_call_async(), cap_grant(), cap_revoke(), ipc_answer(), ipc_register_irq(), sysinfo_value(), and thread_create(). |
|
Definition at line 44 of file libc.h. Referenced by as_area_create(), as_area_resize(), futex_down_timeout(), ipc_call_sync_3(), and ipc_wait_cycle(). |
|
Definition at line 45 of file libc.h. Referenced by ipc_answer_fast(), ipc_call_async_2(), ipc_call_sync(), ipc_forward_fast(), and map_physmem(). |
|
Definition at line 42 of file include/limits.h. |
|
Definition at line 43 of file include/limits.h. |
|
Definition at line 44 of file include/limits.h. |
|
Definition at line 45 of file include/limits.h. |
|
Definition at line 51 of file include/limits.h. |
|
Definition at line 52 of file include/limits.h. |
|
Definition at line 56 of file include/limits.h. |
|
Definition at line 57 of file include/limits.h. |
|
Definition at line 58 of file include/limits.h. |
|
Definition at line 59 of file include/limits.h. |
|
Definition at line 61 of file include/limits.h. |
|
Definition at line 62 of file include/limits.h. |
|
Definition at line 63 of file include/limits.h. |
|
Definition at line 64 of file include/limits.h. |
|
Definition at line 66 of file include/limits.h. |
|
Definition at line 67 of file include/limits.h. |
|
Definition at line 68 of file include/limits.h. |
|
Definition at line 69 of file include/limits.h. |
|
Value: (c)->pc = (sysarg_t) (_pc); \ (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \ (c)->tls = (sysarg_t) (ptls); Definition at line 43 of file include/psthread.h. |
|
Definition at line 49 of file include/psthread.h. Referenced by psthread_add_ready(), and psthread_schedule_next_adv(). |
|
Definition at line 46 of file stdarg.h. Referenced by printf(), snprintf(), and sprintf(). |
|
Definition at line 47 of file stdarg.h. Referenced by printf_core(). |
|
Definition at line 48 of file stdarg.h. Referenced by printf(), snprintf(), and sprintf(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 51 of file stdint.h. Referenced by float32_to_int32(), and float64_to_int32(). |
|
Definition at line 52 of file stdint.h. Referenced by float32_to_int32(), and float64_to_int32(). |
|
Definition at line 53 of file stdint.h. Referenced by float32_to_uint32(), and float64_to_uint32(). |
|
Definition at line 54 of file stdint.h. Referenced by float32_to_uint32(), and float64_to_uint32(). |
|
Definition at line 56 of file stdint.h. Referenced by float32_to_int64(), and float64_to_int64(). |
|
Definition at line 57 of file stdint.h. Referenced by float32_to_int64(), and float64_to_int64(). |
|
Definition at line 58 of file stdint.h. Referenced by float32_to_uint64(), and float64_to_uint64(). |
|
Definition at line 59 of file stdint.h. Referenced by float32_to_uint64(), and float64_to_uint64(). |
|
Definition at line 41 of file stdio.h. Referenced by getchar(), putchar(), and putnchars(). |
|
Definition at line 58 of file stdio.h. Referenced by internal_malloc_stats(). |
|
|
|
Definition at line 42 of file stdlib.h. Referenced by draw_pixmap(), and make_pixmap(). |
|
Definition at line 44 of file stdlib.h. Referenced by random(). |
|
|
|
Definition at line 40 of file mman.h. Referenced by draw_pixmap(), make_pixmap(), and mmap(). |
|
Definition at line 42 of file mman.h. Referenced by draw_pixmap(), and make_pixmap(). |
|
|
|
|
|
Definition at line 45 of file mman.h. Referenced by draw_pixmap(), make_pixmap(), and mmap(). |
|
Definition at line 47 of file mman.h. Referenced by draw_pixmap(), and make_pixmap(). |
|
Definition at line 48 of file mman.h. Referenced by draw_pixmap(), and make_pixmap(). |
|
|
|
Definition at line 40 of file sys/time.h. Referenced by gettimeofday(). |
|
|
Definition at line 42 of file unistd.h. Referenced by psthread_create(), and thread_create(). |
|
Definition at line 199 of file async.c. Referenced by _async_init(), and conn_hash(). |
|
show prefixes 0x or 0 Definition at line 46 of file printf_core.c. Referenced by print_number(), and printf_core(). |
|
signed / unsigned number Definition at line 47 of file printf_core.c. Referenced by print_number(), and printf_core(). |
|
print leading zeroes Definition at line 48 of file printf_core.c. Referenced by print_number(), and printf_core(). |
|
align to left Definition at line 49 of file printf_core.c. Referenced by print_char(), print_number(), print_string(), and printf_core(). |
|
always show + sign Definition at line 50 of file printf_core.c. Referenced by print_number(), and printf_core(). |
|
print space instead of plus Definition at line 51 of file printf_core.c. Referenced by print_number(), and printf_core(). |
|
show big characters Definition at line 52 of file printf_core.c. Referenced by print_number(), and printf_core(). |
|
number has - sign Definition at line 53 of file printf_core.c. Referenced by print_number(), and printf_core(). |
|
Buffer big enought for 64 bit number printed in base 2, sign, prefix and 0 to terminate string.. (last one is only for better testing end of buffer by zero-filling subroutine) Definition at line 55 of file printf_core.c. Referenced by print_number(). |
|
Definition at line 50 of file stream.c. Referenced by get_fd_phone(), open(), read(), and write(). |
|
Definition at line 47 of file psthread.c. Referenced by psthread_create(). |
|
Definition at line 48 of file generic/thread.c. Referenced by thread_create(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 41 of file hash_table.h. |
|
Definition at line 42 of file hash_table.h. |
|
Definition at line 43 of file hash_table.h. |
|
Definition at line 44 of file hash_table.h. |
|
|
|
Definition at line 58 of file include/psthread.h. |
|
Definition at line 73 of file include/psthread.h. |
|
|
|
Definition at line 42 of file sys/time.h. |
|
Definition at line 43 of file sys/time.h. |
|
|
|
Definition at line 51 of file include/psthread.h. |
|
Enumeration of possible arguments types.
Definition at line 62 of file printf_core.c. |
|
Create address space area.
Definition at line 48 of file as.c. References __SYSCALL3. |
|
Resize address space area.
Definition at line 61 of file as.c. References __SYSCALL3. Referenced by sbrk(). |
|
Destroy address space area.
Definition at line 72 of file as.c. References __SYSCALL1. Referenced by gettimeofday(), munmap(), receive_comm_area(), and shm_handle(). |
|
Set maximum heap size and return pointer just after the heap Definition at line 125 of file as.c. References maxheapsize. Referenced by as_get_mappable_page(). |
|
Return pointer to some unmapped area, where fits new as_area TODO: make some first_fit/... algorithm, we are now just incrementing the pointer to last area Definition at line 138 of file as.c. References ALIGN_UP, maxheapsize, set_maxheapsize(), and USER_ADDRESS_SPACE_SIZE_ARCH. Referenced by fb_init(), get_as(), gettimeofday(), main(), mmap(), receive_comm_area(), and shm_handle(). Here is the call graph for this function: |
|
Definition at line 46 of file async.h. References PS_TO_MANAGER, and psthread_schedule_next_adv(). Referenced by main(). Here is the call graph for this function: |
|
Return new incoming message for current(thread-local) connection Definition at line 297 of file async.c. References awaiter_t::active, assert, async_futex, msg_t::call, msg_t::callid, awaiter_t::expires, futex_down(), futex_up(), gettimeofday(), awaiter_t::inlist, insert_timeout(), msg_t::link, list_empty(), list_get_instance, list_remove(), connection_t::msg_queue, link::next, NULL, PS_connection, PS_TO_MANAGER, psthread_schedule_next_adv(), awaiter_t::timedout, tv_add(), and connection_t::wdata. Referenced by async_get_call(), and fb_client_connection(). Here is the call graph for this function: |
|
Definition at line 52 of file async.h. References async_get_call_timeout(). Referenced by client_connection(), console_connection(), fb_client_connection(), and keyboard_events(). Here is the call graph for this function: |
|
Send message and return id of the sent message The return value can be used as input for async_wait() to wait for completion. Definition at line 633 of file async.c. References _exit(), in_interrupt_handler, ipc_call_async_2(), printf(), and reply_received(). Referenced by async_req_2(). Here is the call graph for this function: |
|
Send message and return id of the sent message The return value can be used as input for async_wait() to wait for completion. Definition at line 659 of file async.c. References _exit(), in_interrupt_handler, ipc_call_async_3(), printf(), and reply_received(). Referenced by async_req_3(). Here is the call graph for this function: |
|
Wait for a message sent by async framework
Definition at line 687 of file async.c. References awaiter_t::active, async_futex, amsg_t::done, futex_down(), futex_up(), awaiter_t::inlist, PS_TO_MANAGER, psthread_get_id(), psthread_schedule_next_adv(), awaiter_t::ptid, amsg_t::retval, and amsg_t::wdata. Referenced by async_req_2(), and async_req_3(). Here is the call graph for this function: |
|
Wait for a message sent by async framework with timeout
Definition at line 718 of file async.c. References awaiter_t::active, async_futex, amsg_t::done, awaiter_t::expires, futex_down(), futex_up(), gettimeofday(), insert_timeout(), NULL, PS_TO_MANAGER, psthread_get_id(), psthread_schedule_next_adv(), awaiter_t::ptid, amsg_t::retval, tv_add(), and amsg_t::wdata. Here is the call graph for this function: |
|
Pseudo-synchronous message sending Send message through IPC, wait in the event loop, until it is received
Definition at line 70 of file async.h. References async_send_2(), and async_wait_for(). Referenced by change_console(), client_connection(), draw_pixmap(), gcons_init(), main(), make_pixmap(), read_stdin(), and vp_create(). Here is the call graph for this function: |
|
Definition at line 85 of file async.h. References async_send_3(), and async_wait_for(). Referenced by draw_pixmap(), and make_pixmap(). Here is the call graph for this function: |
|
Create new thread for a new connection Creates new thread for connection, fills in connection structures and inserts it into the hash table, so that later we can easily do routing of messages to particular threads.
Definition at line 412 of file async.c. References async_futex, conn_hash_table, connection_thread(), futex_down(), futex_up(), hash_table_insert(), ipc_answer_fast(), list_initialize(), NULL, psthread_add_ready(), and psthread_create(). Referenced by handle_call(), and main(). Here is the call graph for this function: |
|
Wait specified time, but in the meantime handle incoming events
Definition at line 758 of file async.c. References _exit(), async_futex, futex_down(), gettimeofday(), in_interrupt_handler, insert_timeout(), NULL, printf(), PS_TO_MANAGER, psthread_get_id(), psthread_schedule_next_adv(), and tv_add(). Here is the call graph for this function: |
|
Add one manager to manager list Definition at line 573 of file async.c. References async_manager_thread(), NULL, psthread_add_manager(), and psthread_create(). Referenced by psthread_schedule_next_adv(). Here is the call graph for this function: |
|
Remove one manager from manager list Definition at line 582 of file async.c. References psthread_remove_manager(). Referenced by __thread_main(). Here is the call graph for this function: |
|
Set function that is called, IPC_M_CONNECT_ME_TO is received
Definition at line 789 of file async.c. References client_connection. |
|
Definition at line 793 of file async.c. References interrupt_received. Referenced by main(). |
|
Initialize internal structures needed for async manager Definition at line 588 of file async.c. References conn_hash_table, CONN_HASH_TABLE_CHAINS, conn_hash_table_ops, hash_table_create(), and printf(). Referenced by __main(). Here is the call graph for this function: |
|
Definition at line 799 of file async.c. References in_interrupt_handler, ipc_call_async_3(), and NULL. Referenced by prtchr(), and tran_putch(). Here is the call graph for this function: |
|
Definition at line 805 of file async.c. References in_interrupt_handler, ipc_call_async_2(), and NULL. Referenced by curs_goto(), draw_pixmap(), gcons_mouse_move(), main(), make_anim(), redraw_state(), set_style(), set_style_col(), and switch_screens(). Here is the call graph for this function: |
|
Definition at line 121 of file async.h. References psthread_inc_sercount(). Referenced by change_console(), client_connection(), interrupt_received(), and printf_core(). Here is the call graph for this function: |
|
Definition at line 125 of file async.h. References psthread_dec_sercount(). Referenced by change_console(), client_connection(), and interrupt_received(). Here is the call graph for this function: |
|
Definition at line 44 of file include/atomic.h. References atomic::count. Referenced by futex_initialize(). |
|
Definition at line 49 of file include/atomic.h. References atomic::count. |
|
Grant capabilities to a task.
Definition at line 49 of file cap.c. References __SYSCALL2. |
|
Revoke capabilities from a task.
Definition at line 65 of file cap.c. References __SYSCALL2. |
|
Definition at line 38 of file ctype.h. Referenced by printf_core(). |
|
Definition at line 43 of file ctype.h. Referenced by _strtoul(). |
|
Map piece of physical memory to task. Caller of this function must have the CAP_MEM_MANAGER capability.
Definition at line 53 of file ddi.c. References __SYSCALL4. |
|
Enable I/O space range to task. Caller of this function must have the IO_MEM_MANAGER capability.
Definition at line 70 of file ddi.c. References __SYSCALL1. |
|
Interrupt control
Definition at line 85 of file ddi.c. References __SYSCALL1. |
|
Initialize futex counter.
Definition at line 83 of file futex.c. References atomic_set(). Referenced by usleep(). Here is the call graph for this function: |
|
Definition at line 88 of file futex.c. References futex_down_timeout(). Referenced by async_get_call_timeout(), async_manager_worker(), async_new_connection(), async_usleep(), async_wait_for(), async_wait_timeout(), connection_thread(), handle_answer(), handle_expired_timeouts(), ipc_call_async_2(), ipc_call_async_3(), ipc_finish_async(), keybuffer_free(), keybuffer_pop(), keybuffer_push(), psthread_add_manager(), psthread_add_ready(), psthread_remove_manager(), psthread_schedule_next_adv(), reply_received(), route_call(), and try_dispatch_queued_calls(). Here is the call graph for this function: |
|
Definition at line 93 of file futex.c. References futex_down_timeout(). Here is the call graph for this function: |
|
Try to down the futex.
Definition at line 109 of file futex.c. References __SYSCALL3, atomic_inc(), atomic_predec(), and atomic::count. Referenced by futex_down(), futex_trydown(), and usleep(). Here is the call graph for this function: |
|
Up the futex.
Definition at line 165 of file futex.c. References __SYSCALL1, atomic_postinc(), and atomic::count. Referenced by async_get_call_timeout(), async_manager_thread(), async_manager_worker(), async_new_connection(), async_wait_for(), async_wait_timeout(), connection_thread(), handle_answer(), handle_expired_timeouts(), ipc_finish_async(), keybuffer_free(), keybuffer_pop(), keybuffer_push(), psthread_add_manager(), psthread_add_ready(), psthread_remove_manager(), psthread_schedule_next_adv(), reply_received(), route_call(), and try_dispatch_queued_calls(). Here is the call graph for this function: |
|
Put count chars from buffer to stdout without adding newline
Definition at line 64 of file io.c. Referenced by puts(), and putstr(). Here is the call graph for this function: |
|
Same as puts, but does not print newline at end Definition at line 76 of file io.c. References NULL, putnchars(), and write(). Here is the call graph for this function: |
|
Definition at line 92 of file io.c. Referenced by interrupt_received(). Here is the call graph for this function: |
|
Definition at line 102 of file io.c. Referenced by do_connect(), do_hangup(), and do_send_msg(). Here is the call graph for this function: |
|
Print formatted string. Print string formatted according to the fmt parameter and variadic arguments. Each formatting directive must have the following form: % [ FLAGS ] [ WIDTH ] [ .PRECISION ] [ TYPE ] CONVERSION
FLAGS:
WIDTH:
PRECISION:
TYPE:
CONVERSION:
All other characters from fmt except the formatting directives are printed in verbatim.
Definition at line 436 of file printf_core.c. References __PRINTF_FLAG_BIGCHARS, __PRINTF_FLAG_LEFTALIGNED, __PRINTF_FLAG_NEGATIVE, __PRINTF_FLAG_PREFIX, __PRINTF_FLAG_SHOWPLUS, __PRINTF_FLAG_SIGNED, __PRINTF_FLAG_SPACESIGN, __PRINTF_FLAG_ZEROPADDED, async_serialize_start(), isdigit(), print_char(), print_number(), print_string(), printf_putnchars(), PrintfQualifierByte, PrintfQualifierInt, PrintfQualifierLong, PrintfQualifierLongLong, PrintfQualifierPointer, PrintfQualifierShort, PrintfQualifierSizeT, and va_arg. Referenced by vprintf(), and vsnprintf(). Here is the call graph for this function: |
|
Definition at line 134 of file stream.c. References EMFILE, FDS, open_stdin(), open_stdout(), strcmp(), streams, stream_t::w, write_null(), and write_stderr(). Referenced by __io_init(), and init_mparams(). Here is the call graph for this function: |
|
Definition at line 186 of file stream.c. References FDS, stream_t::phone, and streams. |
|
Create chained hash table.
Definition at line 55 of file hash_table.c. References assert, hash_table_operations::compare, hash_table::entries, hash_table::entry, hash_table_operations::hash, list_initialize(), hash_table::max_keys, memset(), hash_table::op, and printf(). Referenced by _async_init(), and main(). Here is the call graph for this function: |
|
Insert item into hash table.
Definition at line 85 of file hash_table.c. References assert, hash_table_operations::compare, hash_table::entry, hash_table_operations::hash, list_append(), and hash_table::op. Referenced by async_new_connection(), and register_service(). Here is the call graph for this function: |
|
Search hash table for an item matching keys.
Definition at line 105 of file hash_table.c. References assert, hash_table_operations::compare, hash_table::entry, hash_table_operations::hash, hash_table::max_keys, link::next, and hash_table::op. Referenced by connect_to_service(), hash_table_remove(), register_service(), and route_call(). |
|
Remove all matching items from hash table. For each removed item, h->remove_callback() is called.
Definition at line 135 of file hash_table.c. References assert, hash_table_operations::compare, hash_table::entries, hash_table::entry, hash_table_operations::hash, hash_table_find(), list_remove(), hash_table::max_keys, link::next, hash_table::op, link::prev, and hash_table_operations::remove_callback. Referenced by connection_thread(). Here is the call graph for this function: |
|
Initialize doubly-linked circular list link Initialize doubly-linked list link.
Definition at line 67 of file list.h. References link::next, NULL, and link::prev. Referenced by list_remove(), and register_service(). |
|
Initialize doubly-linked circular list Initialize doubly-linked circular list.
Definition at line 79 of file list.h. References link::next, and link::prev. Referenced by async_new_connection(), hash_table_create(), and list_concat(). |
|
Add item to the beginning of doubly-linked circular list Add item to the beginning of doubly-linked circular list.
Definition at line 92 of file list.h. References link::next, and link::prev. |
|
Add item to the end of doubly-linked circular list Add item to the end of doubly-linked circular list.
Definition at line 107 of file list.h. References link::next, and link::prev. Referenced by hash_table_insert(), insert_timeout(), ipc_finish_async(), psthread_add_manager(), psthread_add_ready(), psthread_main(), psthread_schedule_next_adv(), route_call(), and try_dispatch_queued_calls(). |
|
Remove item from doubly-linked circular list Remove item from doubly-linked circular list.
Definition at line 121 of file list.h. References link_initialize(), link::next, and link::prev. Referenced by async_get_call_timeout(), connection_thread(), handle_answer(), handle_expired_timeouts(), hash_table_remove(), psthread_remove_manager(), psthread_schedule_next_adv(), reply_received(), route_call(), and try_dispatch_queued_calls(). Here is the call graph for this function: |
|
Query emptiness of doubly-linked circular list Query emptiness of doubly-linked circular list.
Definition at line 134 of file list.h. References link::next. Referenced by async_get_call_timeout(), async_manager_worker(), connection_thread(), list_concat(), psthread_remove_manager(), psthread_schedule_next_adv(), and try_dispatch_queued_calls(). |
|
Split or concatenate headless doubly-linked circular list Split or concatenate headless doubly-linked circular list. Note that the algorithm works both directions: concatenates splitted lists and splits concatenated lists.
Definition at line 150 of file list.h. References link::next, and link::prev. Referenced by headless_list_concat(), and headless_list_split(). |
|
Split headless doubly-linked circular list Split headless doubly-linked circular list.
Definition at line 169 of file list.h. References headless_list_split_or_concat(). Here is the call graph for this function: |
|
Concatenate two headless doubly-linked circular lists Concatenate two headless doubly-linked circular lists.
Definition at line 181 of file list.h. References headless_list_split_or_concat(). Here is the call graph for this function: |
|
Check for membership Check whether link is contained in the list head. The membership is defined as pointer equivalence.
Definition at line 49 of file list.c. References link::next. |
|
Concatenate two lists Concatenate lists head1 and head2, producing a single list head1 containing items from both (in head1, head2 order) and empty list head2.
Definition at line 76 of file list.c. References list_empty(), list_initialize(), link::next, and link::prev. Here is the call graph for this function: |
|
Definition at line 58 of file libc.c. References __tcb_set(), _async_init(), _heap, as_area_create(), psthread_setup(), and psthread_data::tcb. Here is the call graph for this function: |
|
Definition at line 68 of file libc.c. References open(). Here is the call graph for this function: |
|
Definition at line 75 of file libc.c. References __tcb_get(), _exit(), and psthread_teardown(). Here is the call graph for this function: |
|
|
|
Referenced by psthread_create(), and psthread_schedule_next_adv(). |
|
Referenced by psthread_schedule_next_adv(). |
|
Create a userspace thread
Definition at line 220 of file psthread.c. References psthread_data::arg, context_save(), context_set, psthread_data::ctx, psthread_data::finished, psthread_data::flags, psthread_data::func, getpagesize, NULL, PSTHREAD_INITIAL_STACK_PAGES_NO, psthread_main(), psthread_setup(), psthread_teardown(), psthread_data::stack, psthread_data::tcb, and psthread_data::waiter. Referenced by async_create_manager(), and async_new_connection(). Here is the call graph for this function: |
|
Wait for uspace pseudo thread to finish.
Definition at line 192 of file psthread.c. References _exit(), printf(), psthread_teardown(), psthread_data::retval, and psthread_data::stack. Here is the call graph for this function: |
|
Setup PSthread information into TCB structure Definition at line 65 of file psthread.c. References __free_tls(), __make_tls(), NULL, and tcb_t::pst_data. Referenced by __main(), __thread_main(), and psthread_create(). Here is the call graph for this function: |
|
Definition at line 86 of file psthread.c. References __free_tls(), and psthread_data::tcb. Referenced by __exit(), __thread_main(), psthread_create(), and psthread_join(). Here is the call graph for this function: |
|
Schedule next userspace pseudo thread. If calling with PS_TO_MANAGER parameter, the async_futex should be held.
Definition at line 114 of file psthread.c. References __tcb_get(), async_create_manager(), context_restore(), context_save(), psthread_data::ctx, psthread_data::flags, futex_down(), futex_up(), psthread_data::link, list_append(), list_empty(), list_get_instance, list_remove(), NULL, PS_FROM_DEAD, PS_FROM_MANAGER, PS_PREEMPT, PS_TO_MANAGER, tcb_t::pst_data, psthread_futex, PSTHREAD_SERIALIZED, serialization_count, serialized_threads, and threads_in_manager. Referenced by async_get_call_timeout(), async_manager(), async_manager_worker(), async_usleep(), async_wait_for(), async_wait_timeout(), ipc_finish_async(), psthread_main(), and psthread_schedule_next(). Here is the call graph for this function: |
|
Add a thread to ready list Definition at line 247 of file psthread.c. References psthread_data::flags, futex_down(), futex_up(), psthread_data::link, list_append(), psthread_futex, and PSTHREAD_SERIALIZED. Referenced by async_new_connection(), handle_expired_timeouts(), reply_received(), route_call(), and try_dispatch_queued_calls(). Here is the call graph for this function: |
|
Add a thread to manager list Definition at line 261 of file psthread.c. References futex_down(), futex_up(), psthread_data::link, list_append(), and psthread_futex. Referenced by async_create_manager(). Here is the call graph for this function: |
|
Remove one manager from manager list Definition at line 273 of file psthread.c. References futex_down(), futex_up(), list_empty(), list_remove(), and psthread_futex. Referenced by async_destroy_manager(). Here is the call graph for this function: |
|
Return thread id of current running thread Definition at line 285 of file psthread.c. References __tcb_get(), and tcb_t::pst_data. Referenced by async_usleep(), async_wait_for(), async_wait_timeout(), and ipc_finish_async(). Here is the call graph for this function: |
|
Disable preemption If the thread wants to send several message in row and does not want to be preempted, it should start async_serialize_start() in the beginning of communication and async_serialize_end() in the end. If it is a true multithreaded application, it should protect the communication channel by a futex as well. Interrupt messages will can still be preempted. Definition at line 298 of file psthread.c. References serialization_count. Referenced by async_serialize_start(). |
|
Definition at line 303 of file psthread.c. References serialization_count. Referenced by async_serialize_end(). |
|
Definition at line 90 of file include/psthread.h. References PS_PREEMPT, and psthread_schedule_next_adv(). Here is the call graph for this function: |
|
Definition at line 42 of file io.c. References nl, NULL, putnchars(), and write(). Here is the call graph for this function: |
|
Print formatted text.
Definition at line 43 of file printf.c. References va_end, va_start, and vprintf(). Referenced by _async_init(), async_send_2(), async_send_3(), async_usleep(), callback(), client_connection(), do_answer_msg(), do_connect(), do_hangup(), do_send_msg(), gettimeofday(), handle_answer(), hash_table_create(), main(), printhelp(), and psthread_join(). Here is the call graph for this function: |
|
Print formatted to the given buffer.
Definition at line 44 of file sprintf.c. References va_end, va_start, and vsprintf(). Here is the call graph for this function: |
|
Print formatted to the given buffer with limited size.
Definition at line 45 of file snprintf.c. References va_end, va_start, and vsnprintf(). Referenced by redraw_state(). Here is the call graph for this function: |
|
Print formatted text.
Definition at line 52 of file vprintf.c. References NULL, printf_core(), and vprintf_write(). Referenced by printf(). Here is the call graph for this function: |
|
Print formatted to the given buffer.
Definition at line 45 of file vsprintf.c. References vsnprintf(). Referenced by sprintf(). Here is the call graph for this function: |
|
Print formatted to the given buffer with limited size.
Definition at line 98 of file vsnprintf.c. References printf_spec::data, printf_core(), and vsnprintf_write(). Referenced by snprintf(), and vsprintf(). Here is the call graph for this function: |
|
Definition at line 39 of file stdlib.c. References glbl_seed, and RAND_MAX. Referenced by rand(). |
|
Definition at line 44 of file stdlib.c. References glbl_seed. Referenced by srand(). |
|
Definition at line 49 of file stdlib.h. References random(). Here is the call graph for this function: |
|
Definition at line 53 of file stdlib.h. References srandom(). Here is the call graph for this function: |
|
Definition at line 44 of file string.c. Referenced by __make_tls(), dlcalloc(), hash_table_create(), and ialloc(). |
|
Definition at line 73 of file string.c. References unaligned_memcpy(). Referenced by __make_tls(), copy_vp_to_pixmap(), draw_pixmap(), draw_rectangle(), internal_realloc(), make_pixmap(), memmove(), refresh_viewport_db(), scroll_port_nodb(), and vsnprintf_write(). Here is the call graph for this function: |
|
Definition at line 89 of file string.c. References memcpy(). Here is the call graph for this function: |
|
Definition at line 120 of file string.c. Referenced by open(). |
|
|
|
|
|
Count the number of characters in the string, not including terminating 0.
Definition at line 110 of file string.c. Referenced by print_string(), and sysinfo_value(). |
|
Return pointer to the first occurence of character c in string
Definition at line 137 of file string.c. References NULL. |
|
Return pointer to the last occurence of character c in string
Definition at line 153 of file string.c. References NULL. |
|
Convert initial part of string to long int according to given base. The number may begin with an arbitrary number of whitespaces followed by optional sign (`+' or `-'). If the base is 0 or 16, the prefix `0x' may be inserted and the number will be taken as hexadecimal one. If the base is 0 and the number begin with a zero, number will be taken as octal one (as with base 8). Otherwise the base 0 is taken as decimal.
Definition at line 261 of file string.c. References _strtoul(), LONG_MAX, and LONG_MIN. Here is the call graph for this function: |
|
Convert initial part of string to unsigned long according to given base. The number may begin with an arbitrary number of whitespaces followed by optional sign (`+' or `-'). If the base is 0 or 16, the prefix `0x' may be inserted and the number will be taken as hexadecimal one. If the base is 0 and the number begin with a zero, number will be taken as octal one (as with base 8). Otherwise the base 0 is taken as decimal.
Definition at line 291 of file string.c. References _strtoul(). Here is the call graph for this function: |
|
Definition at line 39 of file mmap.c. References as_area_create(), as_get_mappable_page(), MAP_ANONYMOUS, and MAP_FAILED. Referenced by draw_pixmap(), and make_pixmap(). Here is the call graph for this function: |
|
Definition at line 52 of file mmap.c. References as_area_destroy(). Referenced by draw_pixmap(), and make_pixmap(). Here is the call graph for this function: |
|
POSIX gettimeofday The time variables are memory mapped(RO) from kernel, which updates them periodically. As it is impossible to read 2 values atomically, we use a trick: First read a seconds, then read microseconds, then read seconds again. If a second elapsed in the meantime, set it to zero. This provides assurance, that at least the sequence of subsequent gettimeofday calls is ordered. Definition at line 66 of file time.c. References _exit(), as_area_destroy(), as_get_mappable_page(), DST_NONE, ipc_call_sync_3(), ktime, NULL, printf(), SERVICE_MEM_REALTIME, timeval::tv_sec, timeval::tv_usec, timezone::tz_dsttime, and timezone::tz_minuteswest. Referenced by async_get_call_timeout(), async_manager_worker(), async_usleep(), async_wait_timeout(), and handle_expired_timeouts(). Here is the call graph for this function: |
|
Definition at line 39 of file sysinfo.c. References __SYSCALL2, and strlen(). Referenced by fb_init(), get_as(), kbd_arch_init(), and main(). Here is the call graph for this function: |
|
Definition at line 38 of file task.c. References __SYSCALL1. |
|
Referenced by thread_create(). |
|
Main thread function. This function is called from __thread_entry() and is used to call the thread's implementing function and perform cleanup and exit when thread returns back. Do not call this function directly.
Definition at line 93 of file generic/thread.c. References __tcb_set(), async_destroy_manager(), psthread_setup(), psthread_teardown(), psthread_data::tcb, and thread_exit(). Here is the call graph for this function: |
|
|
|
Terminate current thread.
Definition at line 150 of file generic/thread.c. References __SYSCALL1. Referenced by __thread_main(), and _exit(). |
|
Create Thread Local storage area, return pointer to TCB(ThreadControlBlock) !! The code requires, that sections .tdata and .tbss are adjacent. It may be changed in the future. Definition at line 63 of file generic/thread.c. References __alloc_tls(), _tbss_end, _tbss_start, _tdata_end, _tdata_start, memcpy(), and memset(). Referenced by psthread_setup(). Here is the call graph for this function: |
|
Allocate TLS & TCB for initial module threads
Definition at line 44 of file arch/ppc32/src/thread.c. Referenced by __make_tls(). |
|
Definition at line 76 of file generic/thread.c. References __free_tls_arch(), _tbss_end, and _tdata_start. Referenced by psthread_setup(), and psthread_teardown(). Here is the call graph for this function: |
|
Definition at line 53 of file arch/ppc32/src/thread.c. Referenced by __free_tls(). |
|
Definition at line 168 of file stream.c. References FDS, streams, and stream_t::w. Referenced by putchar(), putnchars(), puts(), putstr(), and vprintf_write(). |
|
Definition at line 178 of file stream.c. References FDS, stream_t::r, and streams. Referenced by getchar(), and init_mparams(). |
|
Definition at line 53 of file libc.c. References thread_exit(). Referenced by __exit(), async_send_2(), async_send_3(), async_usleep(), gettimeofday(), main(), and psthread_join(). Here is the call graph for this function: |
|
Sbrk emulation
Definition at line 91 of file as.c. References as_area_resize(), heapsize, maxheapsize, and NULL. Here is the call graph for this function: |
|
Wait unconditionally for specified microseconds Definition at line 109 of file time.c. References futex_down_timeout(), futex_initialize(), and FUTEX_INITIALIZER. Referenced by main(), open_stdin(), and open_stdout(). Here is the call graph for this function: |
|
|
|
Thread function that gets created on new connection This function is defined as a weak symbol - to be redefined in user code. Definition at line 352 of file async.c. References ipc_answer_fast(). Here is the call graph for this function: |
|
|
|
Add microseconds to give timeval Definition at line 156 of file async.c. References timeval::tv_sec, and timeval::tv_usec. Referenced by async_get_call_timeout(), async_usleep(), and async_wait_timeout(). |
|
Subtract 2 timevals, return microseconds difference Definition at line 167 of file async.c. References timeval::tv_sec, and timeval::tv_usec. Referenced by async_manager_worker(). |
|
Compare timeval
Definition at line 181 of file async.c. References timeval::tv_sec, and timeval::tv_usec. Referenced by handle_expired_timeouts(). |
|
Definition at line 189 of file async.c. References timeval::tv_sec, and timeval::tv_usec. Referenced by async_manager_worker(), and insert_timeout(). |
|
Definition at line 201 of file async.c. References assert, and CONN_HASH_TABLE_CHAINS. |
|
Definition at line 207 of file async.c. References hash_table_get_instance, and connection_t::in_phone_hash. |
|
Definition at line 216 of file async.c. References hash_table_get_instance. |
|
Insert sort timeout msg into timeouts list Definition at line 232 of file async.c. References awaiter_t::expires, awaiter_t::inlist, awaiter_t::link, list_append(), list_get_instance, link::next, awaiter_t::timedout, and tv_gteq(). Referenced by async_get_call_timeout(), async_usleep(), and async_wait_timeout(). Here is the call graph for this function: |
|
Try to route a call to an appropriate connection thread Definition at line 255 of file async.c. References awaiter_t::active, async_futex, connection_t::close_callid, conn_hash_table, futex_down(), futex_up(), hash_table_find(), hash_table_get_instance, ipc_call_t::in_phone_hash, awaiter_t::inlist, awaiter_t::link, list_append(), list_remove(), connection_t::msg_queue, psthread_add_ready(), awaiter_t::ptid, and connection_t::wdata. Referenced by handle_call(). Here is the call graph for this function: |
|
Wrapper for client connection thread When new connection arrives, thread with this function is created. It calls client_connection and does final cleanup.
Definition at line 367 of file async.c. References async_futex, connection_t::call, msg_t::callid, connection_t::callid, connection_t::close_callid, conn_hash_table, connection_t::cthread, futex_down(), futex_up(), hash_table_remove(), connection_t::in_phone_hash, ipc_answer_fast(), msg_t::link, list_empty(), list_get_instance, list_remove(), connection_t::msg_queue, link::next, and PS_connection. Referenced by async_new_connection(). Here is the call graph for this function: |
|
Handle call that was received Definition at line 449 of file async.c. References async_new_connection(), client_connection, in_interrupt_handler, ipc_answer_fast(), and route_call(). Referenced by async_manager_worker(). Here is the call graph for this function: |
|
Fire all timeouts that expired Definition at line 477 of file async.c. References async_futex, futex_down(), futex_up(), gettimeofday(), list_get_instance, list_remove(), link::next, NULL, psthread_add_ready(), and tv_gt(). Referenced by async_manager_worker(). Here is the call graph for this function: |
|
Endless loop dispatching incoming calls and answers Definition at line 508 of file async.c. References async_futex, awaiter_t::expires, futex_down(), futex_up(), gettimeofday(), handle_call(), handle_expired_timeouts(), ipc_wait_cycle(), list_empty(), list_get_instance, NULL, PS_FROM_MANAGER, psthread_schedule_next_adv(), tv_gteq(), and tv_sub(). Referenced by async_manager_thread(). Here is the call graph for this function: |
|
Function to start async_manager as a standalone thread When more kernel threads are used, one async manager should exist per thread. The particular implementation may change, currently one async_manager is started automatically per kernel thread except main thread. Definition at line 562 of file async.c. References async_futex, async_manager_worker(), and futex_up(). Referenced by async_create_manager(). Here is the call graph for this function: |
|
IPC handler for messages in async framework Notify thread that is waiting for this message, that it arrived Definition at line 602 of file async.c. References awaiter_t::active, async_futex, amsg_t::dataptr, amsg_t::done, futex_down(), futex_up(), awaiter_t::inlist, awaiter_t::link, list_remove(), psthread_add_ready(), awaiter_t::ptid, amsg_t::retval, and amsg_t::wdata. Referenced by async_send_2(), and async_send_3(). Here is the call graph for this function: |
|
Print count chars from buffer without adding newline
Definition at line 81 of file printf_core.c. References printf_spec::data, and printf_spec::write. Referenced by print_string(), printf_core(), and printf_putstr(). |
|
Print string without added newline
Definition at line 91 of file printf_core.c. References printf_spec::data, NULL, printf_putnchars(), and printf_spec::write. Referenced by print_number(), and print_string(). Here is the call graph for this function: |
|
Print one character to output
Definition at line 113 of file printf_core.c. References printf_spec::data, and printf_spec::write. Referenced by print_char(), print_number(), and print_string(). |
|
Print one formatted character
Definition at line 126 of file printf_core.c. References __PRINTF_FLAG_LEFTALIGNED, and printf_putchar(). Referenced by printf_core(). Here is the call graph for this function: |
|
Print one string
Definition at line 156 of file printf_core.c. References __PRINTF_FLAG_LEFTALIGNED, NULL, printf_putchar(), printf_putnchars(), printf_putstr(), and strlen(). Referenced by printf_core(). Here is the call graph for this function: |
|
Print number in given base Print significant digits of a number in given base.
Definition at line 217 of file printf_core.c. References __PRINTF_FLAG_BIGCHARS, __PRINTF_FLAG_LEFTALIGNED, __PRINTF_FLAG_NEGATIVE, __PRINTF_FLAG_PREFIX, __PRINTF_FLAG_SHOWPLUS, __PRINTF_FLAG_SIGNED, __PRINTF_FLAG_SPACESIGN, __PRINTF_FLAG_ZEROPADDED, digits_big, digits_small, PRINT_NUMBER_BUFFER_SIZE, printf_putchar(), and printf_putstr(). Referenced by printf_core(). Here is the call graph for this function: |
|
Definition at line 62 of file stream.c. Referenced by open(). |
|
Definition at line 67 of file stream.c. References async_req_2(), CONSOLE_GETCHAR, phone, r0, r1, and streams. Referenced by open_stdin(). Here is the call graph for this function: |
|
Definition at line 81 of file stream.c. References async_msg, CONSOLE_PUTCHAR, phone, and streams. Referenced by open_stdout(). |
|
Definition at line 92 of file stream.c. References console_phone, ipc_connect_me_to(), NULL, stream_t::param, stream_t::phone, stream_t::r, read_stdin(), SERVICE_CONSOLE, usleep(), and stream_t::w. Referenced by open(). Here is the call graph for this function: |
|
Definition at line 110 of file stream.c. References console_phone, ipc_connect_me_to(), NULL, stream_t::param, stream_t::phone, stream_t::r, SERVICE_CONSOLE, usleep(), stream_t::w, and write_stdout(). Referenced by open(). Here is the call graph for this function: |
|
Definition at line 128 of file stream.c. Referenced by open(). |
|
Definition at line 42 of file vprintf.c. References write(). Referenced by vprintf(). Here is the call graph for this function: |
|
Write string to given buffer. Write at most data->size characters including trailing zero. According to C99 has snprintf to return number of characters that would have been written if enough space had been available. Hence the return value is not number of really printed characters but size of input string. Number of really used characters is stored in data->len.
Definition at line 59 of file vsnprintf.c. References vsnprintf_data::len, memcpy(), vsnprintf_data::size, and vsnprintf_data::string. Referenced by vsnprintf(). Here is the call graph for this function: |
|
|
|
|
|
|
|
Function that is called on entry to new uspace thread Definition at line 93 of file psthread.c. References __tcb_get(), psthread_data::arg, psthread_data::finished, psthread_data::func, psthread_data::link, list_append(), PS_FROM_DEAD, tcb_t::pst_data, psthread_schedule_next_adv(), psthread_data::retval, and psthread_data::waiter. Referenced by psthread_create(). Here is the call graph for this function: |
|
Definition at line 58 of file string.c. Referenced by memcpy(). |
|
Convert string to a number. Core of strtol and strtoul functions.
Definition at line 174 of file string.c. References isspace(), and ULONG_MAX. Referenced by strtol(), and strtoul(). Here is the call graph for this function: |
|
|
|
Create userspace thread. This function creates new userspace thread and allocates userspace stack and userspace argument structure for it.
Definition at line 122 of file generic/thread.c. References __SYSCALL2, __thread_entry(), getpagesize, and THREAD_INITIAL_STACK_PAGES_NO. Here is the call graph for this function: |
|
Asynchronous library The aim of this library is facilitating writing programs utilizing the asynchronous nature of Helenos IPC, yet using a normal way of programming. You should be able to write very simple multithreaded programs, the async framework will automatically take care of most synchronization problems. Default semantics:
Example of use: 1) Multithreaded client application create_thread(thread1); create_thread(thread2); ... thread1() { conn = ipc_connect_me_to(); c1 = send(conn); c2 = send(conn); wait_for(c1); wait_for(c2); } 2) Multithreaded server application main() { async_manager(); } client_connection(icallid, *icall) { if (want_refuse) { ipc_answer_fast(icallid, ELIMIT, 0, 0); return; } ipc_answer_fast(icallid, 0, 0, 0); callid = async_get_call(&call); handle(callid, call); ipc_answer_fast(callid, 1,2,3); callid = async_get_call(&call); .... } TODO: Detaching/joining dead psthreads? Definition at line 102 of file async.c. Referenced by async_get_call_timeout(), async_manager_thread(), async_manager_worker(), async_new_connection(), async_usleep(), async_wait_for(), async_wait_timeout(), connection_thread(), handle_expired_timeouts(), ipc_finish_async(), reply_received(), route_call(), and try_dispatch_queued_calls(). |
|
Definition at line 77 of file as.c. Referenced by sbrk(). |
|
Definition at line 78 of file as.c. Referenced by as_get_mappable_page(), sbrk(), and set_maxheapsize(). |
|
|
|
Referenced by __main(). |
|
Asynchronous library The aim of this library is facilitating writing programs utilizing the asynchronous nature of Helenos IPC, yet using a normal way of programming. You should be able to write very simple multithreaded programs, the async framework will automatically take care of most synchronization problems. Default semantics:
Example of use: 1) Multithreaded client application create_thread(thread1); create_thread(thread2); ... thread1() { conn = ipc_connect_me_to(); c1 = send(conn); c2 = send(conn); wait_for(c1); wait_for(c2); } 2) Multithreaded server application main() { async_manager(); } client_connection(icallid, *icall) { if (want_refuse) { ipc_answer_fast(icallid, ELIMIT, 0, 0); return; } ipc_answer_fast(icallid, 0, 0, 0); callid = async_get_call(&call); handle(callid, call); ipc_answer_fast(callid, 1,2,3); callid = async_get_call(&call); .... } TODO: Detaching/joining dead psthreads? Definition at line 102 of file async.c. Referenced by async_get_call_timeout(), async_manager_thread(), async_manager_worker(), async_new_connection(), async_usleep(), async_wait_for(), async_wait_timeout(), connection_thread(), handle_expired_timeouts(), ipc_finish_async(), reply_received(), route_call(), and try_dispatch_queued_calls(). |
|
Definition at line 103 of file async.c. Referenced by _async_init(), async_new_connection(), connection_thread(), and route_call(). |
|
Identifier of incoming connection handled by current thread Definition at line 145 of file async.c. Referenced by async_get_call_timeout(), and connection_thread(). |
|
If true, it is forbidden to use async_req functions and all preemption is disabled Definition at line 148 of file async.c. Referenced by async_msg_2(), async_msg_3(), async_send_2(), async_send_3(), async_usleep(), and handle_call(). |
|
Definition at line 152 of file async.c. Referenced by async_set_client_connection(), handle_call(), and main(). |
|
Definition at line 153 of file async.c. Referenced by async_set_interrupt_received(), and main(). |
|
Initial value: { .hash = conn_hash, .compare = conn_compare, .remove_callback = conn_remove } Definition at line 223 of file async.c. Referenced by _async_init(). |
|
Definition at line 40 of file io.c. Referenced by puts(). |
|
Small hexadecimal characters Definition at line 72 of file printf_core.c. Referenced by print_number(). |
|
Big hexadecimal characters Definition at line 73 of file printf_core.c. Referenced by print_number(). |
|
Definition at line 59 of file stream.c. Referenced by open_stdin(), and open_stdout(). |
|
Definition at line 60 of file stream.c. Referenced by get_fd_phone(), open(), read(), read_stdin(), write(), and write_stdout(). |
|
|
|
Definition at line 56 of file psthread.c. Referenced by psthread_add_manager(), psthread_add_ready(), psthread_remove_manager(), and psthread_schedule_next_adv(). |
|
Count of real threads that are in async_serialized mode Definition at line 58 of file psthread.c. Referenced by psthread_schedule_next_adv(). |
|
Thread-local count of serialization. If >0, we must not preempt Definition at line 60 of file psthread.c. Referenced by psthread_dec_sercount(), psthread_inc_sercount(), and psthread_schedule_next_adv(). |
|
Counter of threads residing in async_manager Definition at line 62 of file psthread.c. Referenced by psthread_schedule_next_adv(). |
|
|
|
|
|
Referenced by __free_tls(), and __make_tls(). |
|
Referenced by __make_tls(). |
|
Referenced by __make_tls(). |
|
Referenced by __free_tls(), and __make_tls(). |
|
Referenced by gettimeofday(). |
|
Framebuffer phone |
|
Framebuffer rows |
|
Framebuffer columns |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|