Changeset 33c2952 in mainline for uspace/lib/c/include
- Timestamp:
- 2012-11-07T21:00:02Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dcb0751
- Parents:
- fc89e32 (diff), 94795812 (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:
-
- 9 added
- 9 edited
-
device/battery_dev.h (added)
-
device/clock_dev.h (added)
-
double_to_str.h (added)
-
ieee_double.h (added)
-
io/con_srv.h (added)
-
io/concaps.h (added)
-
io/console.h (modified) (2 diffs)
-
io/klog.h (modified) (1 diff)
-
io/log.h (modified) (1 diff)
-
io/logctl.h (added)
-
io/verify.h (added)
-
ipc/console.h (modified) (1 diff)
-
ipc/dev_iface.h (modified) (1 diff)
-
ipc/logger.h (added)
-
ipc/services.h (modified) (1 diff)
-
macros.h (modified) (1 diff)
-
stdio.h (modified) (1 diff)
-
sys/time.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/io/console.h
rfc89e32 r33c2952 37 37 38 38 #include <sys/time.h> 39 #include <io/concaps.h> 39 40 #include <io/kbd_event.h> 40 41 #include <io/keycode.h> … … 42 43 #include <bool.h> 43 44 #include <stdio.h> 44 45 typedef enum {46 CONSOLE_CAP_NONE = 0,47 CONSOLE_CAP_STYLE = 1,48 CONSOLE_CAP_INDEXED = 2,49 CONSOLE_CAP_RGB = 450 } console_caps_t;51 45 52 46 /** Console control structure. */ -
uspace/lib/c/include/io/klog.h
rfc89e32 r33c2952 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
rfc89e32 r33c2952 36 36 37 37 #include <stdarg.h> 38 #include <inttypes.h> 39 #include <io/verify.h> 38 40 41 /** Log message level. */ 39 42 typedef enum { 43 /** Fatal error, program is not able to recover at all. */ 40 44 LVL_FATAL, 45 /** Serious error but the program can recover from it. */ 41 46 LVL_ERROR, 47 /** Easily recoverable problem. */ 42 48 LVL_WARN, 49 /** Information message that ought to be printed by default. */ 43 50 LVL_NOTE, 51 /** Debugging purpose message. */ 44 52 LVL_DEBUG, 53 /** More detailed debugging message. */ 45 54 LVL_DEBUG2, 46 55 47 56 /** For checking range of values */ 48 57 LVL_LIMIT 49 58 } log_level_t; 50 59 51 extern int log_init(const char *, log_level_t); 52 extern void log_msg(log_level_t, const char *, ...); 53 extern void log_msgv(log_level_t, const char *, va_list); 60 /** Log itself (logging target). */ 61 typedef sysarg_t log_t; 62 /** Formatting directive for printing log_t. */ 63 #define PRIlogctx PRIxn 64 65 /** Default log (target). */ 66 #define LOG_DEFAULT ((log_t) -1) 67 68 /** Use when creating new top-level log. */ 69 #define LOG_NO_PARENT ((log_t) 0) 70 71 extern const char *log_level_str(log_level_t); 72 extern int log_level_from_str(const char *, log_level_t *); 73 74 extern int log_init(const char *); 75 extern log_t log_create(const char *, log_t); 76 77 extern void log_msg(log_t, log_level_t, const char *, ...) 78 PRINTF_ATTRIBUTE(3, 4); 79 extern void log_msgv(log_t, log_level_t, const char *, va_list); 54 80 55 81 #endif -
uspace/lib/c/include/ipc/console.h
rfc89e32 r33c2952 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/ipc/dev_iface.h
rfc89e32 r33c2952 54 54 /** Interface provided by USB HID devices. */ 55 55 USBHID_DEV_IFACE, 56 /** Interface provided by Real Time Clock devices */ 57 CLOCK_DEV_IFACE, 58 /** Interface provided by battery powered devices */ 59 BATTERY_DEV_IFACE, 56 60 /** Interface provided by AHCI devices. */ 57 61 AHCI_DEV_IFACE, -
uspace/lib/c/include/ipc/services.h
rfc89e32 r33c2952 45 45 SERVICE_VFS = FOURCC('v', 'f', 's', ' '), 46 46 SERVICE_LOC = FOURCC('l', 'o', 'c', ' '), 47 SERVICE_LOGGER = FOURCC('l', 'o', 'g', 'g'), 47 48 SERVICE_DEVMAN = FOURCC('d', 'e', 'v', 'n'), 48 49 SERVICE_IRC = FOURCC('i', 'r', 'c', ' '), -
uspace/lib/c/include/macros.h
rfc89e32 r33c2952 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) -
uspace/lib/c/include/stdio.h
rfc89e32 r33c2952 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) -
uspace/lib/c/include/sys/time.h
rfc89e32 r33c2952 1 1 /* 2 2 * Copyright (c) 2006 Ondrej Palkovsky 3 * Copyright (c) 2011 Petr Koupy 4 * Copyright (c) 2011 Jiri Zarevucky 3 5 * All rights reserved. 4 6 * … … 39 41 40 42 #define DST_NONE 0 43 #define ASCTIME_BUF_LEN 26 41 44 42 45 typedef long time_t; … … 45 48 typedef uint32_t useconds_t; 46 49 typedef uint32_t mseconds_t; 50 51 struct tm { 52 int tm_sec; /* Seconds [0,60]. */ 53 int tm_min; /* Minutes [0,59]. */ 54 int tm_hour; /* Hour [0,23]. */ 55 int tm_mday; /* Day of month [1,31]. */ 56 int tm_mon; /* Month of year [0,11]. */ 57 int tm_year; /* Years since 1900. */ 58 int tm_wday; /* Day of week [0,6] (Sunday = 0). */ 59 int tm_yday; /* Day of year [0,365]. */ 60 int tm_isdst; /* Daylight Savings flag. */ 61 }; 47 62 48 63 struct timeval { … … 61 76 extern int tv_gteq(struct timeval *tv1, struct timeval *tv2); 62 77 extern int gettimeofday(struct timeval *tv, struct timezone *tz); 78 extern int getuptime(struct timeval *tv); 63 79 64 80 extern void udelay(useconds_t); 81 82 extern time_t mktime(struct tm *tm); 83 extern int time_utc2tm(const time_t time, struct tm *result); 84 extern int time_utc2str(const time_t time, char *buf); 85 extern void time_tm2str(const struct tm *timeptr, char *buf); 86 extern int time_local2tm(const time_t time, struct tm *result); 87 extern int time_local2str(const time_t time, char *buf); 88 extern double difftime(time_t time1, time_t time0); 89 extern size_t strftime(char *restrict s, size_t maxsize, 90 const char *restrict format, const struct tm *restrict tm); 65 91 66 92 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
