Changeset 850235d in mainline for uspace/lib/c/include
- Timestamp:
- 2013-03-10T14:56:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 05bab88
- Parents:
- ea906c29 (diff), 2277e03 (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:
-
- 2 added
- 30 edited
- 2 moved
-
adt/hash_table.h (modified) (1 diff)
-
async.h (modified) (1 diff)
-
atomicdflt.h (modified) (1 diff)
-
bd_srv.h (modified) (1 diff)
-
cfg.h (modified) (1 diff)
-
ddi.h (modified) (2 diffs)
-
device/hw_res.h (modified) (1 diff)
-
devman.h (modified) (1 diff)
-
double_to_str.h (added)
-
fibril_synch.h (modified) (1 diff)
-
ieee_double.h (added)
-
inet/iplink_srv.h (modified) (1 diff)
-
io/charfield.h (modified) (1 diff)
-
io/con_srv.h (modified) (1 diff)
-
io/console.h (modified) (1 diff)
-
io/klog.h (modified) (1 diff)
-
io/pixel.h (modified) (1 diff)
-
io/pixelmap.h (modified) (1 diff)
-
io/window.h (modified) (3 diffs)
-
ipc/vfs.h (modified) (1 diff)
-
loc.h (modified) (1 diff)
-
macros.h (modified) (2 diffs)
-
nic/nic.h (modified) (1 diff)
-
rtld/dynamic.h (modified) (1 diff)
-
sort.h (modified) (1 diff)
-
stack.h (moved) (moved from uspace/lib/c/include/bool.h ) (2 diffs)
-
stacktrace.h (modified) (1 diff)
-
stats.h (modified) (1 diff)
-
stdbool.h (moved) (moved from uspace/lib/posix/include/posix/stdbool.h ) (2 diffs)
-
stdio.h (modified) (2 diffs)
-
str.h (modified) (1 diff)
-
sys/stat.h (modified) (1 diff)
-
sysinfo.h (modified) (1 diff)
-
tls.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/adt/hash_table.h
rea906c29 r850235d 40 40 #include <adt/list.h> 41 41 #include <unistd.h> 42 #include < bool.h>42 #include <stdbool.h> 43 43 #include <macros.h> 44 44 -
uspace/lib/c/include/async.h
rea906c29 r850235d 44 44 #include <sys/time.h> 45 45 #include <atomic.h> 46 #include < bool.h>46 #include <stdbool.h> 47 47 #include <task.h> 48 48 -
uspace/lib/c/include/atomicdflt.h
rea906c29 r850235d 41 41 42 42 #include <stdint.h> 43 #include < bool.h>43 #include <stdbool.h> 44 44 45 45 typedef struct atomic { -
uspace/lib/c/include/bd_srv.h
rea906c29 r850235d 39 39 #include <async.h> 40 40 #include <fibril_synch.h> 41 #include < bool.h>41 #include <stdbool.h> 42 42 #include <sys/types.h> 43 43 -
uspace/lib/c/include/cfg.h
rea906c29 r850235d 41 41 #include <adt/list.h> 42 42 #include <sys/types.h> 43 #include < bool.h>43 #include <stdbool.h> 44 44 45 45 /** -
uspace/lib/c/include/ddi.h
rea906c29 r850235d 36 36 #define LIBC_DDI_H_ 37 37 38 #include <stdbool.h> 38 39 #include <sys/types.h> 40 #include <sys/time.h> 39 41 #include <abi/ddi/irq.h> 40 42 #include <task.h> … … 50 52 extern int dmamem_unmap_anonymous(void *); 51 53 52 extern int iospace_enable(task_id_t, void *, unsigned long);53 54 extern int pio_enable(void *, size_t, void **); 55 56 typedef void (*trace_fnc)(const volatile void *place, uint32_t val, 57 volatile void* base, size_t size, void *data, bool write); 58 59 extern int pio_trace_enable(void *, size_t, trace_fnc, void *); 60 extern void pio_trace_log(const volatile void *, uint32_t val, bool write); 61 extern void pio_trace_disable(void *); 62 63 extern void pio_write_8(ioport8_t *, uint8_t); 64 extern void pio_write_16(ioport16_t *, uint16_t); 65 extern void pio_write_32(ioport32_t *, uint32_t); 66 67 extern uint8_t pio_read_8(const ioport8_t *); 68 extern uint16_t pio_read_16(const ioport16_t *); 69 extern uint32_t pio_read_32(const ioport32_t *); 70 71 static inline uint8_t pio_change_8( 72 ioport8_t *reg, uint8_t val, uint8_t mask, useconds_t delay) 73 { 74 uint8_t v = pio_read_8(reg); 75 udelay(delay); 76 pio_write_8(reg, (v & ~mask) | val); 77 return v; 78 } 79 80 static inline uint16_t pio_change_16( 81 ioport16_t *reg, uint16_t val, uint16_t mask, useconds_t delay) 82 { 83 uint16_t v = pio_read_16(reg); 84 udelay(delay); 85 pio_write_16(reg, (v & ~mask) | val); 86 return v; 87 } 88 89 static inline uint32_t pio_change_32( 90 ioport32_t *reg, uint32_t val, uint32_t mask, useconds_t delay) 91 { 92 uint32_t v = pio_read_32(reg); 93 udelay(delay); 94 pio_write_32(reg, (v & ~mask) | val); 95 return v; 96 } 97 98 static inline uint8_t pio_set_8(ioport8_t *r, uint8_t v, useconds_t d) 99 { 100 return pio_change_8(r, v, 0, d); 101 } 102 static inline uint16_t pio_set_16(ioport16_t *r, uint16_t v, useconds_t d) 103 { 104 return pio_change_16(r, v, 0, d); 105 } 106 static inline uint32_t pio_set_32(ioport32_t *r, uint32_t v, useconds_t d) 107 { 108 return pio_change_32(r, v, 0, d); 109 } 110 111 static inline uint8_t pio_clear_8(ioport8_t *r, uint8_t v, useconds_t d) 112 { 113 return pio_change_8(r, 0, v, d); 114 } 115 static inline uint16_t pio_clear_16(ioport16_t *r, uint16_t v, useconds_t d) 116 { 117 return pio_change_16(r, 0, v, d); 118 } 119 static inline uint32_t pio_clear_32(ioport32_t *r, uint32_t v, useconds_t d) 120 { 121 return pio_change_32(r, 0, v, d); 122 } 54 123 55 124 extern int irq_register(int, int, int, irq_code_t *); -
uspace/lib/c/include/device/hw_res.h
rea906c29 r850235d 38 38 #include <ipc/dev_iface.h> 39 39 #include <async.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 42 42 #define DMA_MODE_ON_DEMAND 0 -
uspace/lib/c/include/devman.h
rea906c29 r850235d 40 40 #include <ipc/loc.h> 41 41 #include <async.h> 42 #include < bool.h>42 #include <stdbool.h> 43 43 44 44 extern async_exch_t *devman_exchange_begin_blocking(devman_interface_t); -
uspace/lib/c/include/fibril_synch.h
rea906c29 r850235d 40 40 #include <libarch/tls.h> 41 41 #include <sys/time.h> 42 #include < bool.h>42 #include <stdbool.h> 43 43 44 44 typedef struct { -
uspace/lib/c/include/inet/iplink_srv.h
rea906c29 r850235d 38 38 #include <async.h> 39 39 #include <fibril_synch.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 #include <sys/types.h> 42 42 -
uspace/lib/c/include/io/charfield.h
rea906c29 r850235d 38 38 39 39 #include <sys/types.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 #include <io/color.h> 42 42 #include <io/style.h> -
uspace/lib/c/include/io/con_srv.h
rea906c29 r850235d 44 44 #include <io/pixel.h> 45 45 #include <io/style.h> 46 #include < bool.h>46 #include <stdbool.h> 47 47 #include <sys/time.h> 48 48 #include <sys/types.h> -
uspace/lib/c/include/io/console.h
rea906c29 r850235d 41 41 #include <io/keycode.h> 42 42 #include <async.h> 43 #include < bool.h>43 #include <stdbool.h> 44 44 #include <stdio.h> 45 45 -
uspace/lib/c/include/io/klog.h
rea906c29 r850235d 42 42 extern size_t klog_write(const void *, size_t); 43 43 extern void klog_update(void); 44 extern void klog_command(const void *, size_t); 44 45 extern int klog_printf(const char *, ...) 45 46 PRINTF_ATTRIBUTE(1, 2); -
uspace/lib/c/include/io/pixel.h
rea906c29 r850235d 42 42 ((channel) >> (8 - (bits))) 43 43 44 #define INVERT(pixel) ((pixel) ^ 0x00ffffff) 45 44 46 #define ALPHA(pixel) ((pixel) >> 24) 45 47 #define RED(pixel) (((pixel) & 0x00ff0000) >> 16) -
uspace/lib/c/include/io/pixelmap.h
rea906c29 r850235d 52 52 sysarg_t y) 53 53 { 54 size_t offset = y * pixelmap->width + x; 55 pixel_t *pixel = pixelmap->data + offset; 56 return pixel; 54 if (x < pixelmap->width && y < pixelmap->height) { 55 size_t offset = y * pixelmap->width + x; 56 pixel_t *pixel = pixelmap->data + offset; 57 return pixel; 58 } else { 59 return NULL; 60 } 57 61 } 58 62 -
uspace/lib/c/include/io/window.h
rea906c29 r850235d 36 36 #define LIBC_IO_WINDOW_H_ 37 37 38 #include < bool.h>38 #include <stdbool.h> 39 39 #include <sys/types.h> 40 40 #include <async.h> … … 71 71 ET_POSITION_EVENT, 72 72 ET_SIGNAL_EVENT, 73 ET_WINDOW_FOCUS, 74 ET_WINDOW_UNFOCUS, 73 75 ET_WINDOW_RESIZE, 74 76 ET_WINDOW_REFRESH, … … 100 102 } window_grab_flags_t; 101 103 102 extern int win_register(async_sess_t *, service_id_t *, service_id_t * );104 extern int win_register(async_sess_t *, service_id_t *, service_id_t *, sysarg_t, sysarg_t); 103 105 104 106 extern int win_get_event(async_sess_t *, window_event_t *); -
uspace/lib/c/include/ipc/vfs.h
rea906c29 r850235d 38 38 #include <ipc/common.h> 39 39 #include <sys/types.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 42 42 #define FS_NAME_MAXLEN 20 -
uspace/lib/c/include/loc.h
rea906c29 r850235d 38 38 #include <ipc/loc.h> 39 39 #include <async.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 42 42 typedef void (*loc_cat_change_cb_t)(void); -
uspace/lib/c/include/macros.h
rea906c29 r850235d 38 38 #define min(a, b) ((a) < (b) ? (a) : (b)) 39 39 #define max(a, b) ((a) > (b) ? (a) : (b)) 40 #define abs(a) ((a) >= 0 ? (a) : (-a)) 41 40 42 41 43 #define KiB2SIZE(kb) ((kb) << 10) … … 60 62 #endif 61 63 64 #define _paddname(line) PADD_ ## line ## __ 65 #define _padd(width, line) uint ## width ## _t _paddname(line) 66 #define PADD32 _padd(32, __LINE__) 67 #define PADD16 _padd(16, __LINE__) 68 #define PADD8 _padd(8, __LINE__) 69 62 70 /** @} 63 71 */ -
uspace/lib/c/include/nic/nic.h
rea906c29 r850235d 40 40 41 41 #include <nic/eth_phys.h> 42 #include < bool.h>42 #include <stdbool.h> 43 43 44 44 /** Ethernet address length. */ -
uspace/lib/c/include/rtld/dynamic.h
rea906c29 r850235d 36 36 #define LIBC_RTLD_DYNAMIC_H_ 37 37 38 #include < bool.h>38 #include <stdbool.h> 39 39 #include <rtld/elf_dyn.h> 40 40 #include <libarch/rtld/dynamic.h> -
uspace/lib/c/include/sort.h
rea906c29 r850235d 37 37 38 38 #include <sys/types.h> 39 #include < bool.h>39 #include <stdbool.h> 40 40 41 41 typedef int (* sort_cmp_t)(void *, void *, void *); -
uspace/lib/c/include/stack.h
rea906c29 r850235d 1 1 /* 2 * Copyright (c) 20 06 Martin Decky2 * Copyright (c) 2012 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 33 33 */ 34 34 35 #ifndef LIBC_ BOOL_H_36 #define LIBC_ BOOL_H_35 #ifndef LIBC_STACK_H_ 36 #define LIBC_STACK_H_ 37 37 38 38 #include <libarch/types.h> 39 #include <abi/bool.h>40 39 41 #define false 0 42 #define true 1 40 extern size_t stack_size_get(void); 43 41 44 42 #endif -
uspace/lib/c/include/stacktrace.h
rea906c29 r850235d 38 38 39 39 #include <sys/types.h> 40 #include < bool.h>40 #include <stdbool.h> 41 41 42 42 typedef struct { -
uspace/lib/c/include/stats.h
rea906c29 r850235d 39 39 #include <thread.h> 40 40 #include <stdint.h> 41 #include < bool.h>41 #include <stdbool.h> 42 42 #include <sys/types.h> 43 43 #include <abi/sysinfo.h> -
uspace/lib/c/include/stdbool.h
rea906c29 r850235d 1 1 /* 2 * Copyright (c) 20 11 Jiri Zarevucky2 * Copyright (c) 2006 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup lib posix29 /** @addtogroup libc 30 30 * @{ 31 31 */ 32 /** @file Boolean type and values.32 /** @file 33 33 */ 34 34 35 #ifndef POSIX_STDBOOL_H_36 #define POSIX_STDBOOL_H_35 #ifndef LIBC_BOOL_H_ 36 #define LIBC_BOOL_H_ 37 37 38 #ifdef LIBC_BOOL_H_ 38 #include <libarch/types.h> 39 #include <abi/bool.h> 39 40 40 #if (!defined(POSIX_STDIO_H_)) && \ 41 (!defined(POSIX_STDLIB_H_)) && \ 42 (!defined(POSIX_STRING_H_)) 43 #error "You can't include bool.h and stdbool.h at the same time." 41 #define false 0 42 #define true 1 43 44 #define __bool_true_false_are_defined 1 45 44 46 #endif 45 47 46 #endif /* LIBC_BOOL_H */ 47 48 #define LIBC_BOOL_H_ 49 50 #define bool _Bool 51 #define true 1 52 #define false 0 53 #define __bool_true_false_are_defined 1 54 55 #endif /* POSIX_STDBOOL_H_ */ 48 /** @} 49 */ -
uspace/lib/c/include/stdio.h
rea906c29 r850235d 40 40 #include <str.h> 41 41 #include <io/verify.h> 42 #include <abi/klog.h> 42 43 43 44 #define EOF (-1) … … 51 52 int _n = snprintf(_buf, sizeof(_buf), fmt, ##__VA_ARGS__); \ 52 53 if (_n > 0) \ 53 (void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) _buf, str_size(_buf)); \54 (void) __SYSCALL3(SYS_KLOG, KLOG_WRITE, (sysarg_t) _buf, str_size(_buf)); \ 54 55 } 55 56 -
uspace/lib/c/include/str.h
rea906c29 r850235d 39 39 #include <mem.h> 40 40 #include <sys/types.h> 41 #include < bool.h>41 #include <stdbool.h> 42 42 43 43 #define U_SPECIAL '?' -
uspace/lib/c/include/sys/stat.h
rea906c29 r850235d 37 37 38 38 #include <sys/types.h> 39 #include < bool.h>39 #include <stdbool.h> 40 40 #include <ipc/vfs.h> 41 41 #include <ipc/loc.h> -
uspace/lib/c/include/sysinfo.h
rea906c29 r850235d 37 37 38 38 #include <sys/types.h> 39 #include < bool.h>39 #include <stdbool.h> 40 40 #include <abi/sysinfo.h> 41 41 -
uspace/lib/c/include/tls.h
rea906c29 r850235d 48 48 extern char _tbss_end; 49 49 50 extern tcb_t * __make_tls(void);51 extern tcb_t * __alloc_tls(void **, size_t);52 extern void __free_tls(tcb_t *);53 extern void __free_tls_arch(tcb_t *, size_t);50 extern tcb_t *tls_make(void); 51 extern tcb_t *tls_alloc_arch(void **, size_t); 52 extern void tls_free(tcb_t *); 53 extern void tls_free_arch(tcb_t *, size_t); 54 54 55 55 #ifdef CONFIG_TLS_VARIANT_1
Note:
See TracChangeset
for help on using the changeset viewer.
