Changeset c621f4aa in mainline for uspace/lib/c/include
- Timestamp:
- 2010-07-25T10:11:13Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 377cce8
- Parents:
- 24a2517 (diff), a2da43c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/c/include
- Files:
-
- 6 added
- 82 moved
-
adt/fifo.h (moved) (moved from uspace/lib/libc/include/adt/fifo.h )
-
adt/gcdlcm.h (moved) (moved from uspace/lib/libc/include/adt/gcdlcm.h )
-
adt/hash_table.h (moved) (moved from uspace/lib/libc/include/adt/hash_table.h )
-
adt/list.h (moved) (moved from uspace/lib/libc/include/adt/list.h )
-
align.h (moved) (moved from uspace/lib/libc/include/align.h )
-
arg_parse.h (added)
-
as.h (moved) (moved from uspace/lib/libc/include/as.h )
-
assert.h (moved) (moved from uspace/lib/libc/include/assert.h )
-
async.h (moved) (moved from uspace/lib/libc/include/async.h ) (1 diff)
-
async_priv.h (moved) (moved from uspace/lib/libc/include/async_priv.h )
-
atomic.h (moved) (moved from uspace/lib/libc/include/atomic.h )
-
atomicdflt.h (moved) (moved from uspace/lib/libc/include/atomicdflt.h ) (1 diff)
-
bitops.h (moved) (moved from uspace/lib/libc/include/bitops.h )
-
bool.h (moved) (moved from uspace/lib/libc/include/bool.h ) (1 diff)
-
byteorder.h (moved) (moved from uspace/lib/libc/include/byteorder.h )
-
cap.h (moved) (moved from uspace/lib/libc/include/cap.h )
-
clipboard.h (moved) (moved from uspace/lib/libc/include/clipboard.h )
-
ctype.h (moved) (moved from uspace/lib/libc/include/ctype.h )
-
ddi.h (moved) (moved from uspace/lib/libc/include/ddi.h )
-
devmap.h (moved) (moved from uspace/lib/libc/include/devmap.h )
-
dirent.h (moved) (moved from uspace/lib/libc/include/dirent.h )
-
err.h (moved) (moved from uspace/lib/libc/include/err.h )
-
errno.h (moved) (moved from uspace/lib/libc/include/errno.h ) (1 diff)
-
event.h (moved) (moved from uspace/lib/libc/include/event.h )
-
fcntl.h (moved) (moved from uspace/lib/libc/include/fcntl.h )
-
fibril.h (moved) (moved from uspace/lib/libc/include/fibril.h )
-
fibril_synch.h (moved) (moved from uspace/lib/libc/include/fibril_synch.h )
-
futex.h (moved) (moved from uspace/lib/libc/include/futex.h ) (1 diff)
-
getopt.h (moved) (moved from uspace/lib/libc/include/getopt.h )
-
inttypes.h (moved) (moved from uspace/lib/libc/include/inttypes.h )
-
io/color.h (moved) (moved from uspace/lib/libc/include/io/color.h ) (2 diffs)
-
io/console.h (moved) (moved from uspace/lib/libc/include/io/console.h ) (2 diffs)
-
io/keycode.h (moved) (moved from uspace/lib/libc/include/io/keycode.h ) (2 diffs)
-
io/klog.h (moved) (moved from uspace/lib/libc/include/io/klog.h ) (1 diff)
-
io/printf_core.h (moved) (moved from uspace/lib/libc/include/io/printf_core.h ) (2 diffs)
-
io/screenbuffer.h (moved) (moved from uspace/srv/hid/console/screenbuffer.h ) (6 diffs)
-
io/style.h (moved) (moved from uspace/lib/libc/include/io/style.h ) (1 diff)
-
ipc/adb.h (moved) (moved from uspace/lib/libc/include/ipc/adb.h )
-
ipc/bd.h (moved) (moved from uspace/lib/libc/include/ipc/bd.h )
-
ipc/bus.h (moved) (moved from uspace/lib/libc/include/ipc/bus.h )
-
ipc/char.h (moved) (moved from uspace/lib/libc/include/ipc/char.h )
-
ipc/clipboard.h (moved) (moved from uspace/lib/libc/include/ipc/clipboard.h )
-
ipc/console.h (moved) (moved from uspace/lib/libc/include/ipc/console.h )
-
ipc/devmap.h (moved) (moved from uspace/lib/libc/include/ipc/devmap.h )
-
ipc/fb.h (moved) (moved from uspace/lib/libc/include/ipc/fb.h )
-
ipc/ipc.h (moved) (moved from uspace/lib/libc/include/ipc/ipc.h )
-
ipc/kbd.h (moved) (moved from uspace/lib/libc/include/ipc/kbd.h )
-
ipc/loader.h (moved) (moved from uspace/lib/libc/include/ipc/loader.h )
-
ipc/mouse.h (moved) (moved from uspace/lib/libc/include/ipc/mouse.h )
-
ipc/ns.h (moved) (moved from uspace/lib/libc/include/ipc/ns.h )
-
ipc/services.h (moved) (moved from uspace/lib/libc/include/ipc/services.h ) (1 diff)
-
ipc/vfs.h (moved) (moved from uspace/lib/libc/include/ipc/vfs.h )
-
libc.h (moved) (moved from uspace/lib/libc/include/libc.h )
-
limits.h (moved) (moved from uspace/lib/libc/include/limits.h )
-
loader/loader.h (moved) (moved from uspace/lib/libc/include/loader/loader.h ) (1 diff)
-
loader/pcb.h (moved) (moved from uspace/lib/libc/include/loader/pcb.h )
-
macros.h (moved) (moved from uspace/lib/libc/include/macros.h ) (1 diff)
-
malloc.h (moved) (moved from uspace/lib/libc/include/malloc.h )
-
mem.h (moved) (moved from uspace/lib/libc/include/mem.h )
-
rwlock.h (moved) (moved from uspace/lib/libc/include/rwlock.h )
-
setjmp.h (moved) (moved from uspace/lib/libc/include/setjmp.h )
-
smc.h (moved) (moved from uspace/lib/libc/include/smc.h )
-
sort.h (added)
-
stacktrace.h (moved) (moved from uspace/lib/libc/include/stacktrace.h ) (1 diff)
-
stats.h (added)
-
stdarg.h (moved) (moved from uspace/lib/libc/include/stdarg.h )
-
stddef.h (moved) (moved from uspace/lib/libc/include/stddef.h )
-
stdint.h (added)
-
stdio.h (moved) (moved from uspace/lib/libc/include/stdio.h ) (7 diffs)
-
stdlib.h (moved) (moved from uspace/lib/libc/include/stdlib.h )
-
str.h (moved) (moved from uspace/lib/libc/include/string.h ) (2 diffs)
-
str_error.h (added)
-
sys/mman.h (moved) (moved from uspace/lib/libc/include/sys/mman.h ) (2 diffs)
-
sys/stat.h (moved) (moved from uspace/lib/libc/include/sys/stat.h ) (2 diffs)
-
sys/time.h (moved) (moved from uspace/lib/libc/include/sys/time.h ) (2 diffs)
-
sys/typefmt.h (moved) (moved from uspace/lib/libc/include/sys/typefmt.h ) (1 diff)
-
sys/types.h (moved) (moved from uspace/lib/libc/include/sys/types.h ) (1 diff)
-
syscall.h (moved) (moved from uspace/lib/libc/include/syscall.h )
-
sysinfo.h (moved) (moved from uspace/lib/libc/include/sysinfo.h ) (2 diffs)
-
task.h (moved) (moved from uspace/lib/libc/include/task.h ) (1 diff)
-
thread.h (moved) (moved from uspace/lib/libc/include/thread.h ) (1 diff)
-
time.h (moved) (moved from uspace/lib/libc/include/time.h )
-
tls.h (moved) (moved from uspace/lib/libc/include/tls.h )
-
trace.h (added)
-
udebug.h (moved) (moved from uspace/lib/libc/include/udebug.h )
-
unistd.h (moved) (moved from uspace/lib/libc/include/unistd.h ) (3 diffs)
-
vfs/canonify.h (moved) (moved from uspace/lib/libc/include/vfs/canonify.h )
-
vfs/vfs.h (moved) (moved from uspace/lib/libc/include/vfs/vfs.h ) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/async.h
r24a2517 rc621f4aa 259 259 } 260 260 261 extern int async_connect_me_to(int, ipcarg_t, ipcarg_t, ipcarg_t); 262 extern int async_connect_me_to_blocking(int, ipcarg_t, ipcarg_t, ipcarg_t); 263 261 264 /* 262 265 * User-friendly wrappers for async_share_in_start(). -
uspace/lib/c/include/atomicdflt.h
r24a2517 rc621f4aa 37 37 38 38 #ifndef LIBC_ARCH_ATOMIC_H_ 39 #error This file cannot be included directly, include atomic.h instead.39 #error This file cannot be included directly, include atomic.h instead. 40 40 #endif 41 41 42 #include <stdint.h> 42 43 #include <bool.h> 43 44 44 45 typedef struct atomic { 45 volatile longcount;46 volatile atomic_count_t count; 46 47 } atomic_t; 47 48 48 static inline void atomic_set(atomic_t *val, longi)49 static inline void atomic_set(atomic_t *val, atomic_count_t i) 49 50 { 50 val->count = i;51 val->count = i; 51 52 } 52 53 53 static inline longatomic_get(atomic_t *val)54 static inline atomic_count_t atomic_get(atomic_t *val) 54 55 { 55 return val->count;56 return val->count; 56 57 } 57 58 58 #ifndef CAS 59 static inline bool cas(atomic_t *val, long ov, longnv)59 #ifndef CAS 60 static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_t nv) 60 61 { 61 62 return __sync_bool_compare_and_swap(&val->count, ov, nv); -
uspace/lib/c/include/bool.h
r24a2517 rc621f4aa 36 36 #define LIBC_BOOL_H_ 37 37 38 #define false 0 39 #define true 1 38 #include <libarch/types.h> 40 39 41 typedef short bool; 40 #define false 0 41 #define true 1 42 43 typedef uint8_t bool; 42 44 43 45 #endif -
uspace/lib/c/include/errno.h
r24a2517 rc621f4aa 43 43 #define errno _errno 44 44 45 #define EMFILE (-1 7)45 #define EMFILE (-18) 46 46 #define ENAMETOOLONG (-256) 47 47 #define EISDIR (-257) -
uspace/lib/c/include/futex.h
r24a2517 rc621f4aa 39 39 #include <sys/types.h> 40 40 41 #define FUTEX_INITIALIZER {1}41 #define FUTEX_INITIALIZER {1} 42 42 43 43 typedef atomic_t futex_t; -
uspace/lib/c/include/io/color.h
r24a2517 rc621f4aa 36 36 #define LIBC_IO_COLOR_H_ 37 37 38 enum console_color{38 typedef enum { 39 39 COLOR_BLACK = 0, 40 40 COLOR_BLUE = 1, … … 48 48 CATTR_BRIGHT = 8, 49 49 CATTR_BLINK = 8 50 } ;50 } console_color_t; 51 51 52 52 #endif -
uspace/lib/c/include/io/console.h
r24a2517 rc621f4aa 44 44 } console_ev_type_t; 45 45 46 enum {46 typedef enum { 47 47 CONSOLE_CCAP_NONE = 0, 48 48 CONSOLE_CCAP_STYLE, 49 49 CONSOLE_CCAP_INDEXED, 50 50 CONSOLE_CCAP_RGB 51 } ;51 } console_caps_t; 52 52 53 53 /** Console event structure. */ … … 68 68 extern void console_clear(int phone); 69 69 70 extern int console_get_size(int phone, i nt *cols, int *rows);71 extern int console_get_pos(int phone, i nt *col, int *row);72 extern void console_ goto(int phone, int col, int row);70 extern int console_get_size(int phone, ipcarg_t *cols, ipcarg_t *rows); 71 extern int console_get_pos(int phone, ipcarg_t *col, ipcarg_t *row); 72 extern void console_set_pos(int phone, ipcarg_t col, ipcarg_t row); 73 73 74 extern void console_set_style(int phone, int style); 75 extern void console_set_color(int phone, int fg_color, int bg_color, int flags); 76 extern void console_set_rgb_color(int phone, int fg_color, int bg_color); 74 extern void console_set_style(int phone, uint8_t style); 75 extern void console_set_color(int phone, uint8_t fg_color, uint8_t bg_color, 76 uint8_t flags); 77 extern void console_set_rgb_color(int phone, uint32_t fg_color, uint32_t bg_color); 77 78 78 79 extern void console_cursor_visibility(int phone, bool show); 79 extern int console_get_color_cap(int phone, i nt *ccap);80 extern int console_get_color_cap(int phone, ipcarg_t *ccap); 80 81 extern void console_kcon_enable(int phone); 81 82 -
uspace/lib/c/include/io/keycode.h
r24a2517 rc621f4aa 51 51 * they really are organized here by position, rather than by label. 52 52 */ 53 enum keycode{53 typedef enum { 54 54 55 55 /* Main block row 1 */ … … 199 199 } keycode_t; 200 200 201 enum keymod{201 typedef enum { 202 202 KM_LSHIFT = 0x001, 203 203 KM_RSHIFT = 0x002, -
uspace/lib/c/include/io/klog.h
r24a2517 rc621f4aa 33 33 */ 34 34 35 #ifndef LIBC_ STREAM_H_36 #define LIBC_ STREAM_H_35 #ifndef LIBC_IO_KLOG_H_ 36 #define LIBC_IO_KLOG_H_ 37 37 38 38 #include <sys/types.h> 39 39 40 extern size_t klog_write(const void * buf, size_t size);40 extern size_t klog_write(const void *, size_t); 41 41 extern void klog_update(void); 42 42 -
uspace/lib/c/include/io/printf_core.h
r24a2517 rc621f4aa 40 40 41 41 /** Structure for specifying output methods for different printf clones. */ 42 typedef struct printf_spec{42 typedef struct { 43 43 /* String output function, returns number of printed characters or EOF */ 44 44 int (*str_write)(const char *, size_t, void *); … … 51 51 } printf_spec_t; 52 52 53 int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);53 extern int printf_core(const char *, printf_spec_t *, va_list); 54 54 55 55 #endif -
uspace/lib/c/include/io/screenbuffer.h
r24a2517 rc621f4aa 33 33 */ 34 34 35 #ifndef SCREENBUFFER_H__36 #define SCREENBUFFER_H__35 #ifndef LIBC_SCREENBUFFER_H__ 36 #define LIBC_SCREENBUFFER_H__ 37 37 38 38 #include <stdint.h> 39 39 #include <sys/types.h> 40 #include <ipc/ipc.h> 40 41 #include <bool.h> 41 42 42 #define DEFAULT_FOREGROUND 0x0 /**< default console foreground color */ 43 #define DEFAULT_BACKGROUND 0xf0f0f0 /**< default console background color */ 43 typedef enum { 44 at_style, 45 at_idx, 46 at_rgb 47 } attr_type_t; 44 48 45 49 typedef struct { … … 58 62 } attr_rgb_t; 59 63 64 typedef union { 65 attr_style_t s; 66 attr_idx_t i; 67 attr_rgb_t r; 68 } attr_val_t; 69 60 70 typedef struct { 61 enum { 62 at_style, 63 at_idx, 64 at_rgb 65 } t; 66 union { 67 attr_style_t s; 68 attr_idx_t i; 69 attr_rgb_t r; 70 } a; 71 attr_type_t t; 72 attr_val_t a; 71 73 } attrs_t; 72 74 … … 82 84 keyfield_t *buffer; /**< Screen content - characters and 83 85 their attributes (used as a circular buffer) */ 84 size_t size_x;/**< Number of columns */85 size_t size_y;/**< Number of rows */86 ipcarg_t size_x; /**< Number of columns */ 87 ipcarg_t size_y; /**< Number of rows */ 86 88 87 89 /** Coordinates of last printed character for determining cursor position */ 88 size_t position_x;89 size_t position_y;90 ipcarg_t position_x; 91 ipcarg_t position_y; 90 92 91 93 attrs_t attrs; /**< Current attributes. */ … … 107 109 * 108 110 */ 109 static inline keyfield_t *get_field_at(screenbuffer_t *scr, size_t x, size_t y)111 static inline keyfield_t *get_field_at(screenbuffer_t *scr, ipcarg_t x, ipcarg_t y) 110 112 { 111 113 return scr->buffer + x + ((y + scr->top_line) % scr->size_y) * scr->size_x; … … 120 122 * 121 123 */ 122 static inline intattrs_same(attrs_t a1, attrs_t a2)124 static inline bool attrs_same(attrs_t a1, attrs_t a2) 123 125 { 124 126 if (a1.t != a2.t) 125 return 0;127 return false; 126 128 127 129 switch (a1.t) { … … 137 139 } 138 140 139 return 0;141 return false; 140 142 } 141 143 144 extern void screenbuffer_putchar(screenbuffer_t *, wchar_t); 145 extern screenbuffer_t *screenbuffer_init(screenbuffer_t *, ipcarg_t, ipcarg_t); 142 146 143 void screenbuffer_putchar(screenbuffer_t *scr, wchar_t c); 144 screenbuffer_t *screenbuffer_init(screenbuffer_t *scr, size_t size_x, size_t size_y); 145 146 void screenbuffer_clear(screenbuffer_t *scr); 147 void screenbuffer_clear_line(screenbuffer_t *scr, size_t line); 148 void screenbuffer_copy_buffer(screenbuffer_t *scr, keyfield_t *dest); 149 void screenbuffer_goto(screenbuffer_t *scr, size_t x, size_t y); 150 void screenbuffer_set_style(screenbuffer_t *scr, uint8_t style); 151 void screenbuffer_set_color(screenbuffer_t *scr, uint8_t fg_color, 152 uint8_t bg_color, uint8_t attr); 153 void screenbuffer_set_rgb_color(screenbuffer_t *scr, uint32_t fg_color, 154 uint32_t bg_color); 147 extern void screenbuffer_clear(screenbuffer_t *); 148 extern void screenbuffer_clear_line(screenbuffer_t *, ipcarg_t); 149 extern void screenbuffer_copy_buffer(screenbuffer_t *, keyfield_t *); 150 extern void screenbuffer_goto(screenbuffer_t *, ipcarg_t, ipcarg_t); 151 extern void screenbuffer_set_style(screenbuffer_t *, uint8_t); 152 extern void screenbuffer_set_color(screenbuffer_t *, uint8_t, uint8_t, uint8_t); 153 extern void screenbuffer_set_rgb_color(screenbuffer_t *, uint32_t, uint32_t); 155 154 156 155 #endif -
uspace/lib/c/include/io/style.h
r24a2517 rc621f4aa 36 36 #define LIBC_IO_STYLE_H_ 37 37 38 enum console_style{38 typedef enum { 39 39 STYLE_NORMAL = 0, 40 STYLE_EMPHASIS = 1 41 }; 40 STYLE_EMPHASIS = 1, 41 STYLE_INVERTED = 2, 42 STYLE_SELECTED = 3 43 } console_style_t; 42 44 43 45 #endif -
uspace/lib/c/include/ipc/services.h
r24a2517 rc621f4aa 47 47 SERVICE_FHC, 48 48 SERVICE_OBIO, 49 SERVICE_CLIPBOARD 49 SERVICE_CLIPBOARD, 50 SERVICE_NETWORKING, 51 SERVICE_LO, 52 SERVICE_DP8390, 53 SERVICE_ETHERNET, 54 SERVICE_NILDUMMY, 55 SERVICE_IP, 56 SERVICE_ARP, 57 SERVICE_RARP, 58 SERVICE_ICMP, 59 SERVICE_UDP, 60 SERVICE_TCP, 61 SERVICE_SOCKET 50 62 } services_t; 51 63 -
uspace/lib/c/include/loader/loader.h
r24a2517 rc621f4aa 51 51 extern int loader_set_cwd(loader_t *); 52 52 extern int loader_set_pathname(loader_t *, const char *); 53 extern int loader_set_args(loader_t *, c har *const[]);53 extern int loader_set_args(loader_t *, const char *const[]); 54 54 extern int loader_set_files(loader_t *, fdi_node_t *const[]); 55 55 extern int loader_load_program(loader_t *); -
uspace/lib/c/include/macros.h
r24a2517 rc621f4aa 48 48 #define STRING_ARG(arg) #arg 49 49 50 #define LOWER32(arg) (( arg) & 0xffffffff)51 #define UPPER32(arg) ((( arg) >> 32) & 0xffffffff)50 #define LOWER32(arg) (((uint64_t) (arg)) & 0xffffffff) 51 #define UPPER32(arg) (((((uint64_t) arg)) >> 32) & 0xffffffff) 52 52 53 53 #define MERGE_LOUP32(lo, up) \ -
uspace/lib/c/include/stacktrace.h
r24a2517 rc621f4aa 57 57 extern void stacktrace_prepare(void); 58 58 extern uintptr_t stacktrace_fp_get(void); 59 extern uintptr_t stacktrace_pc_get( );59 extern uintptr_t stacktrace_pc_get(void); 60 60 61 61 #endif -
uspace/lib/c/include/stdio.h
r24a2517 rc621f4aa 38 38 #include <sys/types.h> 39 39 #include <stdarg.h> 40 #include <str ing.h>40 #include <str.h> 41 41 #include <adt/list.h> 42 42 … … 46 46 #define BUFSIZ 4096 47 47 48 #define DEBUG(fmt, ...) \48 #define DEBUG(fmt, ...)se\ 49 49 { \ 50 50 char _buf[256]; \ … … 56 56 #ifndef SEEK_SET 57 57 #define SEEK_SET 0 58 #endif 59 60 #ifndef SEEK_CUR 58 61 #define SEEK_CUR 1 62 #endif 63 64 #ifndef SEEK_END 59 65 #define SEEK_END 2 60 66 #endif … … 67 73 /** Full buffering */ 68 74 _IOFBF 75 }; 76 77 enum _buffer_state { 78 /** Buffer is empty */ 79 _bs_empty, 80 81 /** Buffer contains data to be written */ 82 _bs_write, 83 84 /** Buffer contains prefetched data for reading */ 85 _bs_read 69 86 }; 70 87 … … 88 105 int phone; 89 106 107 /** 108 * Non-zero if the stream needs sync on fflush(). XXX change 109 * console semantics so that sync is not needed. 110 */ 111 int need_sync; 112 90 113 /** Buffering type */ 91 114 enum _buffer_type btype; 115 92 116 /** Buffer */ 93 117 uint8_t *buf; 118 94 119 /** Buffer size */ 95 120 size_t buf_size; 121 122 /** Buffer state */ 123 enum _buffer_state buf_state; 124 96 125 /** Buffer I/O pointer */ 97 126 uint8_t *buf_head; 127 128 /** Points to end of occupied space when in read mode. */ 129 uint8_t *buf_tail; 98 130 } FILE; 99 131 … … 104 136 /* Character and string input functions */ 105 137 extern int fgetc(FILE *); 106 extern char *fgets(char *, size_t, FILE *);138 extern char *fgets(char *, int, FILE *); 107 139 108 140 extern int getchar(void); … … 135 167 extern size_t fwrite(const void *, size_t, size_t, FILE *); 136 168 137 extern int fseek(FILE *, long, int);169 extern int fseek(FILE *, off64_t, int); 138 170 extern void rewind(FILE *); 139 extern int ftell(FILE *);171 extern off64_t ftell(FILE *); 140 172 extern int feof(FILE *); 141 173 -
uspace/lib/c/include/str.h
r24a2517 rc621f4aa 33 33 */ 34 34 35 #ifndef LIBC_STR ING_H_36 #define LIBC_STR ING_H_35 #ifndef LIBC_STR_H_ 36 #define LIBC_STR_H_ 37 37 38 38 #include <mem.h> … … 86 86 extern char *str_ndup(const char *, size_t max_size); 87 87 88 extern void order_suffix(const uint64_t val, uint64_t *rv, char *suffix); 89 88 90 /* 89 91 * TODO: Get rid of this. -
uspace/lib/c/include/sys/mman.h
r24a2517 rc621f4aa 41 41 #define MAP_FAILED ((void *) -1) 42 42 43 #define MAP_SHARED (1 << 0)44 #define MAP_PRIVATE (1 << 1)45 #define MAP_FIXED (1 << 2)46 #define MAP_ANONYMOUS (1 << 3)43 #define MAP_SHARED (1 << 0) 44 #define MAP_PRIVATE (1 << 1) 45 #define MAP_FIXED (1 << 2) 46 #define MAP_ANONYMOUS (1 << 3) 47 47 48 48 #define PROTO_READ AS_AREA_READ … … 50 50 #define PROTO_EXEC AS_AREA_EXEC 51 51 52 extern void *mmap(void *start, size_t length, int prot, int flags, int fd,53 off_t offset);52 extern void *mmap(void *start, size_t length, int prot, int flags, int fd, 53 aoff64_t offset); 54 54 extern int munmap(void *start, size_t length); 55 55 -
uspace/lib/c/include/sys/stat.h
r24a2517 rc621f4aa 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 35 #ifndef LIBC_SYS_STAT_H_ … … 48 48 bool is_file; 49 49 bool is_directory; 50 off_t size;50 aoff64_t size; 51 51 dev_handle_t device; 52 52 }; -
uspace/lib/c/include/sys/time.h
r24a2517 rc621f4aa 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 35 #ifndef LIBC_SYS_TIME_H_ … … 44 44 45 45 struct timeval { 46 time_t tv_sec; /* seconds */47 suseconds_t tv_usec; /* microseconds */46 time_t tv_sec; /* seconds */ 47 suseconds_t tv_usec; /* microseconds */ 48 48 }; 49 49 50 50 struct timezone { 51 int tz_minuteswest;/* minutes W of Greenwich */52 int tz_dsttime;/* type of dst correction */51 int tz_minuteswest; /* minutes W of Greenwich */ 52 int tz_dsttime; /* type of dst correction */ 53 53 }; 54 54 -
uspace/lib/c/include/sys/typefmt.h
r24a2517 rc621f4aa 39 39 #include <inttypes.h> 40 40 41 /* off_t */ 42 #define PRIdOFF "ld" 43 #define PRIuOFF "lu" 44 #define PRIxOFF "lx" 45 #define PRIXOFF "lX" 46 47 /* bn_t */ 48 #define PRIdBN PRId64 49 #define PRIuBN PRIu64 50 #define PRIxBN PRIx64 51 #define PRIXBN PRIX64 41 /* off64_t */ 42 #define PRIdOFF64 PRId64 43 #define PRIuOFF64 PRIu64 44 #define PRIxOFF64 PRIx64 45 #define PRIXOFF64 PRIX64 52 46 53 47 /* (s)size_t */ -
uspace/lib/c/include/sys/types.h
r24a2517 rc621f4aa 38 38 #include <libarch/types.h> 39 39 40 typedef long off_t; 41 typedef int mode_t; 42 typedef uint64_t bn_t; /**< Block number type. */ 40 typedef unsigned int mode_t; 43 41 42 /** Relative offset */ 43 typedef int64_t off64_t; 44 45 /** Absolute offset */ 46 typedef uint64_t aoff64_t; 47 48 /** Unicode code point */ 44 49 typedef int32_t wchar_t; 45 50 -
uspace/lib/c/include/sysinfo.h
r24a2517 rc621f4aa 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 35 #ifndef LIBC_SYSINFO_H_ … … 37 37 38 38 #include <libc.h> 39 #include <sysinfo.h>40 #include <string.h>41 39 42 sysarg_t sysinfo_value(char *name); 40 /** Sysinfo value types 41 * 42 */ 43 typedef enum { 44 SYSINFO_VAL_UNDEFINED = 0, 45 SYSINFO_VAL_VAL = 1, 46 SYSINFO_VAL_DATA = 2 47 } sysinfo_item_tag_t; 48 49 extern sysinfo_item_tag_t sysinfo_get_tag(const char *); 50 extern int sysinfo_get_value(const char *, sysarg_t *); 51 extern void *sysinfo_get_data(const char *, size_t *); 43 52 44 53 #endif -
uspace/lib/c/include/task.h
r24a2517 rc621f4aa 46 46 47 47 extern task_id_t task_get_id(void); 48 extern int task_set_name(const char *name); 49 extern task_id_t task_spawn(const char *path, char *const argv[]); 50 extern int task_wait(task_id_t id, task_exit_t *texit, int *retval); 51 extern int task_retval(int val); 52 48 extern int task_set_name(const char *); 49 extern task_id_t task_spawn(const char *, const char *const[], int *); 50 extern int task_wait(task_id_t id, task_exit_t *, int *); 51 extern int task_retval(int); 53 52 54 53 #endif -
uspace/lib/c/include/thread.h
r24a2517 rc621f4aa 45 45 extern void __thread_main(uspace_arg_t *); 46 46 47 extern int thread_create(void (*)(void *), void *, c har *, thread_id_t *);47 extern int thread_create(void (*)(void *), void *, const char *, thread_id_t *); 48 48 extern void thread_exit(int) __attribute__ ((noreturn)); 49 49 extern void thread_detach(thread_id_t); -
uspace/lib/c/include/unistd.h
r24a2517 rc621f4aa 47 47 #ifndef SEEK_SET 48 48 #define SEEK_SET 0 49 #endif 50 51 #ifndef SEEK_CUR 49 52 #define SEEK_CUR 1 53 #endif 54 55 #ifndef SEEK_END 50 56 #define SEEK_END 2 51 57 #endif … … 58 64 extern ssize_t read(int, void *, size_t); 59 65 60 extern off _t lseek(int, off_t, int);61 extern int ftruncate(int, off_t);66 extern off64_t lseek(int, off64_t, int); 67 extern int ftruncate(int, aoff64_t); 62 68 63 69 extern int close(int); … … 69 75 extern int chdir(const char *); 70 76 71 extern void _exit(int status) __attribute__((noreturn));72 extern int usleep(useconds_t uses);73 extern unsigned int sleep(unsigned int se);77 extern void _exit(int) __attribute__((noreturn)); 78 extern int usleep(useconds_t); 79 extern unsigned int sleep(unsigned int); 74 80 75 81 #endif -
uspace/lib/c/include/vfs/vfs.h
r24a2517 rc621f4aa 43 43 /** 44 44 * This type is a libc version of the VFS triplet. 45 * It uniquel ly identifies a file system node within a file system instance.45 * It uniquely identifies a file system node within a file system instance. 46 46 */ 47 47 typedef struct {
Note:
See TracChangeset
for help on using the changeset viewer.
