Changeset 70253688 in mainline for uspace/lib/c
- Timestamp:
- 2012-09-07T08:12:05Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e0c836e8
- Parents:
- 131d9a4 (diff), 8cf4823 (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
- Files:
-
- 7 added
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/Makefile
r131d9a4 r70253688 95 95 generic/inetping.c \ 96 96 generic/io/asprintf.c \ 97 generic/io/input.c \ 97 98 generic/io/io.c \ 98 99 generic/io/chargrid.c \ … … 106 107 generic/io/vsnprintf.c \ 107 108 generic/io/printf_core.c \ 109 generic/io/con_srv.c \ 108 110 generic/io/console.c \ 109 111 generic/io/visualizer.c \ -
uspace/lib/c/arch/abs32le/_link.ld.in
r131d9a4 r70253688 15 15 #ifdef LOADER 16 16 . = 0x70001000 + SIZEOF_HEADERS; 17 18 .interp : {19 *(.interp);20 } :interp :text21 17 #else 22 18 . = 0x1000 + SIZEOF_HEADERS; 23 19 #endif 24 25 /* Make sure the code is aligned reasonably */26 . = ALIGN(., 16);27 20 28 21 .text : { … … 30 23 *(.rodata .rodata.*); 31 24 } :text 25 26 #ifdef LOADER 27 .interp : { 28 *(.interp); 29 } :interp :text 30 #endif 32 31 33 32 . = . + 0x1000; -
uspace/lib/c/arch/abs32le/include/types.h
r131d9a4 r70253688 47 47 48 48 typedef uint32_t sysarg_t; 49 typedef int32_t native_t; 49 50 50 51 typedef int32_t ssize_t; -
uspace/lib/c/arch/amd64/_link.ld.in
r131d9a4 r70253688 16 16 #ifdef LOADER 17 17 . = 0x70001000 + SIZEOF_HEADERS; 18 19 .interp : {20 *(.interp);21 } :interp :text22 18 #else 23 19 . = 0x1000 + SIZEOF_HEADERS; 24 20 #endif 25 26 /* Make sure the code is aligned reasonably */27 . = ALIGN(., 16);28 21 29 22 .init : { … … 35 28 *(.rodata .rodata.*); 36 29 } :text 30 31 #ifdef LOADER 32 .interp : { 33 *(.interp); 34 } :interp :text 35 #endif 37 36 38 37 . = . + 0x1000; -
uspace/lib/c/arch/amd64/include/types.h
r131d9a4 r70253688 47 47 48 48 typedef uint64_t sysarg_t; 49 typedef int64_t native_t; 49 50 50 51 typedef int64_t ssize_t; -
uspace/lib/c/arch/arm32/_link.ld.in
r131d9a4 r70253688 15 15 #ifdef LOADER 16 16 . = 0x70001000 + SIZEOF_HEADERS; 17 18 .interp : {19 *(.interp);20 } :interp :text21 17 #else 22 18 . = 0x1000 + SIZEOF_HEADERS; 23 19 #endif 24 25 /* Make sure the code is aligned reasonably */26 . = ALIGN(., 8);27 20 28 21 .init : { … … 34 27 *(.rodata .rodata.*); 35 28 } :text 29 30 #ifdef LOADER 31 .interp : { 32 *(.interp); 33 } :interp :text 34 #endif 36 35 37 36 . = . + 0x1000; -
uspace/lib/c/arch/arm32/include/types.h
r131d9a4 r70253688 48 48 49 49 typedef uint32_t sysarg_t; 50 typedef int32_t native_t; 50 51 51 52 typedef int32_t ssize_t; -
uspace/lib/c/arch/ia32/_link.ld.in
r131d9a4 r70253688 24 24 . = 0x1000 + SIZEOF_HEADERS; 25 25 #endif 26 27 #if defined(LOADER) || defined(DLEXE)28 .interp : {29 *(.interp);30 } :interp :text31 #endif32 33 /* Make sure the code is aligned reasonably */34 . = ALIGN(., 16);35 26 36 27 .init : { … … 71 62 } :text 72 63 #endif 64 65 #if defined(LOADER) || defined(DLEXE) 66 .interp : { 67 *(.interp); 68 } :interp :text 69 #endif 70 73 71 . = . + 0x1000; 74 72 -
uspace/lib/c/arch/ia32/include/types.h
r131d9a4 r70253688 47 47 48 48 typedef uint32_t sysarg_t; 49 typedef int32_t native_t; 49 50 50 51 typedef int32_t ssize_t; -
uspace/lib/c/arch/ia64/_link.ld.in
r131d9a4 r70253688 15 15 #ifdef LOADER 16 16 . = 0x800000000 + SIZEOF_HEADERS; 17 18 .interp : {19 *(.interp);20 } :interp :text21 17 #else 22 18 . = 0x4000 + SIZEOF_HEADERS; 23 19 #endif 24 20 25 /* Make sure the code is aligned reasonably*/21 /* Workaround proper alignment of the .init section */ 26 22 . = ALIGN(., 16); 27 23 … … 34 30 *(.rodata .rodata.*); 35 31 } :text 32 33 #ifdef LOADER 34 .interp : { 35 *(.interp); 36 } :interp :text 37 #endif 36 38 37 39 . = . + 0x4000; -
uspace/lib/c/arch/ia64/include/types.h
r131d9a4 r70253688 57 57 58 58 typedef uint64_t sysarg_t; 59 typedef int64_t native_t; 59 60 60 61 typedef int64_t ssize_t; -
uspace/lib/c/arch/mips32/_link.ld.in
r131d9a4 r70253688 15 15 #ifdef LOADER 16 16 . = 0x70004000 + SIZEOF_HEADERS; 17 18 .interp : {19 *(.interp);20 } :interp :text21 17 #else 22 18 . = 0x4000 + SIZEOF_HEADERS; 23 19 #endif 24 25 /* Make sure the code is aligned reasonably */26 . = ALIGN(., 16);27 20 28 21 .init : { … … 34 27 *(.rodata .rodata.*); 35 28 } :text 29 30 #ifdef LOADER 31 .interp : { 32 *(.interp); 33 } :interp :text 34 #endif 36 35 37 36 . = . + 0x4000; -
uspace/lib/c/arch/mips32/include/types.h
r131d9a4 r70253688 48 48 49 49 typedef uint32_t sysarg_t; 50 typedef int32_t native_t; 50 51 51 52 typedef int32_t ssize_t; -
uspace/lib/c/arch/mips64/_link.ld.in
r131d9a4 r70253688 16 16 #ifdef LOADER 17 17 . = 0x70004000 + SIZEOF_HEADERS; 18 19 .interp : {20 *(.interp);21 } :interp :text22 18 #else 23 19 . = 0x4000 + SIZEOF_HEADERS; 24 20 #endif 25 26 /* Make sure the code is aligned reasonably */27 . = ALIGN(., 16);28 21 29 22 .init : { … … 35 28 *(.rodata .rodata.*); 36 29 } :text 30 31 #ifdef LOADER 32 .interp : { 33 *(.interp); 34 } :interp :text 35 #endif 37 36 38 37 . = . + 0x4000; -
uspace/lib/c/arch/mips64/include/types.h
r131d9a4 r70253688 48 48 49 49 typedef uint64_t sysarg_t; 50 typedef int64_t native_t; 50 51 51 52 typedef int64_t ssize_t; -
uspace/lib/c/arch/ppc32/_link.ld.in
r131d9a4 r70253688 16 16 #ifdef LOADER 17 17 . = 0x70001000 + SIZEOF_HEADERS; 18 19 .interp : {20 *(.interp);21 } :interp :text22 18 #else 23 19 . = 0x1000 + SIZEOF_HEADERS; 24 20 #endif 25 26 /* Make sure the code is aligned reasonably */27 . = ALIGN(., 4);28 21 29 22 .init : { … … 35 28 *(.rodata .rodata.*); 36 29 } :text 30 31 #ifdef LOADER 32 .interp : { 33 *(.interp); 34 } :interp :text 35 #endif 37 36 38 37 . = . + 0x1000; -
uspace/lib/c/arch/ppc32/include/types.h
r131d9a4 r70253688 47 47 48 48 typedef uint32_t sysarg_t; 49 typedef int32_t native_t; 49 50 50 51 typedef int32_t ssize_t; -
uspace/lib/c/arch/sparc64/_link.ld.in
r131d9a4 r70253688 15 15 #ifdef LOADER 16 16 . = 0x70004000 + SIZEOF_HEADERS; 17 18 .interp : {19 *(.interp);20 } :interp :text21 17 #else 22 18 . = 0x4000 + SIZEOF_HEADERS; 23 19 #endif 24 25 /* Make sure the code is aligned reasonably */26 . = ALIGN(., 16);27 20 28 21 .init : { … … 34 27 *(.rodata .rodata.*); 35 28 } :text 29 30 #ifdef LOADER 31 .interp : { 32 *(.interp); 33 } :interp :text 34 #endif 36 35 37 36 . = . + 0x4000; -
uspace/lib/c/arch/sparc64/include/types.h
r131d9a4 r70253688 47 47 48 48 typedef uint64_t sysarg_t; 49 typedef int64_t native_t; 49 50 50 51 typedef int64_t ssize_t; -
uspace/lib/c/generic/io/console.c
r131d9a4 r70253688 38 38 #include <async.h> 39 39 #include <errno.h> 40 #include <stdio.h>41 40 #include <malloc.h> 42 41 #include <vfs/vfs_sess.h> … … 126 125 { 127 126 async_exch_t *exch = async_exchange_begin(ctrl->output_sess); 128 async_req_1_0(exch, CONSOLE_ CURSOR_VISIBILITY, (show != false));127 async_req_1_0(exch, CONSOLE_SET_CURSOR_VISIBILITY, (show != false)); 129 128 async_exchange_end(exch); 130 129 } … … 151 150 { 152 151 async_exch_t *exch = async_exchange_begin(ctrl->output_sess); 153 async_req_2_0(exch, CONSOLE_ GOTO, col, row);152 async_req_2_0(exch, CONSOLE_SET_POS, col, row); 154 153 async_exchange_end(exch); 155 154 } -
uspace/lib/c/generic/io/output.c
r131d9a4 r70253688 37 37 #include <as.h> 38 38 #include <ipc/output.h> 39 #include <io/concaps.h> 39 40 #include <io/output.h> 40 41 -
uspace/lib/c/generic/tls.c
r131d9a4 r70253688 42 42 #include <str.h> 43 43 #include <align.h> 44 #include <unistd.h> 44 45 45 46 /** Create TLS (Thread Local Storage) data structures. … … 57 58 58 59 tcb = __alloc_tls(&data, tls_size); 60 if (!tcb) 61 return NULL; 59 62 60 63 /* … … 89 92 90 93 result = malloc(sizeof(tcb_t) + size); 94 if (!result) 95 return NULL; 91 96 *data = ((void *)result) + sizeof(tcb_t); 97 92 98 return result; 93 99 } … … 118 124 size = ALIGN_UP(size, &_tls_alignment); 119 125 *data = memalign((uintptr_t) &_tls_alignment, sizeof(tcb_t) + size); 120 126 if (!*data) 127 return NULL; 121 128 tcb = (tcb_t *) (*data + size); 122 129 tcb->self = tcb; -
uspace/lib/c/include/io/console.h
r131d9a4 r70253688 37 37 38 38 #include <sys/time.h> 39 #include <io/concaps.h> 40 #include <io/kbd_event.h> 39 41 #include <io/keycode.h> 40 42 #include <async.h> 41 43 #include <bool.h> 42 44 #include <stdio.h> 43 44 typedef enum {45 CONSOLE_CAP_NONE = 0,46 CONSOLE_CAP_STYLE = 1,47 CONSOLE_CAP_INDEXED = 2,48 CONSOLE_CAP_RGB = 449 } console_caps_t;50 45 51 46 /** Console control structure. */ … … 69 64 aid_t input_aid; 70 65 } console_ctrl_t; 71 72 typedef enum {73 KEY_PRESS,74 KEY_RELEASE75 } kbd_event_type_t;76 77 /** Console event structure. */78 typedef struct {79 /** List handle */80 link_t link;81 82 /** Press or release event. */83 kbd_event_type_t type;84 85 /** Keycode of the key that was pressed or released. */86 keycode_t key;87 88 /** Bitmask of modifiers held. */89 keymod_t mods;90 91 /** The character that was generated or '\0' for none. */92 wchar_t c;93 } kbd_event_t;94 66 95 67 extern console_ctrl_t *console_init(FILE *, FILE *); -
uspace/lib/c/include/io/klog.h
r131d9a4 r70253688 38 38 #include <sys/types.h> 39 39 #include <stdarg.h> 40 #include <io/verify.h> 40 41 41 42 extern size_t klog_write(const void *, size_t); 42 43 extern void klog_update(void); 43 extern int klog_printf(const char *, ...); 44 extern int klog_printf(const char *, ...) 45 PRINTF_ATTRIBUTE(1, 2); 44 46 extern int klog_vprintf(const char *, va_list); 45 47 -
uspace/lib/c/include/io/log.h
r131d9a4 r70253688 37 37 #include <stdarg.h> 38 38 #include <inttypes.h> 39 #include < bool.h>39 #include <io/verify.h> 40 40 41 41 typedef enum { … … 46 46 LVL_DEBUG, 47 47 LVL_DEBUG2, 48 48 49 49 /** For checking range of values */ 50 50 LVL_LIMIT … … 62 62 extern log_t log_create(const char *, log_t); 63 63 64 extern void log_msg(log_t, log_level_t, const char *, ...); 64 extern void log_msg(log_t, log_level_t, const char *, ...) 65 PRINTF_ATTRIBUTE(3, 4); 65 66 extern void log_msgv(log_t, log_level_t, const char *, va_list); 66 67 -
uspace/lib/c/include/ipc/console.h
r131d9a4 r70253688 43 43 CONSOLE_GET_EVENT, 44 44 CONSOLE_GET_POS, 45 CONSOLE_ GOTO,45 CONSOLE_SET_POS, 46 46 CONSOLE_CLEAR, 47 47 CONSOLE_SET_STYLE, 48 48 CONSOLE_SET_COLOR, 49 49 CONSOLE_SET_RGB_COLOR, 50 CONSOLE_ CURSOR_VISIBILITY50 CONSOLE_SET_CURSOR_VISIBILITY 51 51 } console_request_t; 52 52 -
uspace/lib/c/include/stdio.h
r131d9a4 r70253688 39 39 #include <stdarg.h> 40 40 #include <str.h> 41 42 #ifndef NVERIFY_PRINTF 43 44 #define PRINTF_ATTRIBUTE(start, end) \ 45 __attribute__((format(gnu_printf, start, end))) 46 47 #else /* NVERIFY_PRINTF */ 48 49 #define PRINTF_ATTRIBUTE(start, end) 50 51 #endif /* NVERIFY_PRINTF */ 41 #include <io/verify.h> 52 42 53 43 #define EOF (-1)
Note:
See TracChangeset
for help on using the changeset viewer.