Changeset 5828554 in mainline for kernel/generic/include
- Timestamp:
- 2014-01-19T14:37:22Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cf982ff
- Parents:
- 2f591127 (diff), 476f62c (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:
- kernel/generic/include
- Files:
-
- 3 edited
- 1 moved
-
console/console.h (modified) (2 diffs)
-
debug.h (modified) (1 diff)
-
log.h (moved) (moved from uspace/lib/c/include/device/ahci.h ) (2 diffs)
-
synch/spinlock.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/console/console.h
r2f591127 r5828554 39 39 #include <print.h> 40 40 #include <console/chardev.h> 41 #include <synch/spinlock.h> 41 42 42 43 #define PAGING(counter, increment, before, after) \ … … 62 63 extern void console_init(void); 63 64 64 extern void klog_init(void); 65 extern void klog_update(void *); 65 extern void kio_init(void); 66 extern void kio_update(void *); 67 extern void kio_flush(void); 68 extern void kio_push_char(const wchar_t); 69 SPINLOCK_EXTERN(kio_lock); 66 70 67 71 extern wchar_t getc(indev_t *indev); 68 72 extern size_t gets(indev_t *indev, char *buf, size_t buflen); 69 extern sysarg_t sys_k log(int cmd, const void *buf, size_t size);73 extern sysarg_t sys_kio(int cmd, const void *buf, size_t size); 70 74 71 75 extern void grab_console(void); -
kernel/generic/include/debug.h
r2f591127 r5828554 107 107 #define LOG(format, ...) \ 108 108 do { \ 109 printf("%s() from %s at %s:%u: " format "\n", __func__, \ 109 log(LF_OTHER, LVL_DEBUG, \ 110 "%s() from %s at %s:%u: " format,__func__, \ 110 111 symtab_fmt_name_lookup(CALLER), __FILE__, __LINE__, \ 111 112 ##__VA_ARGS__); \ -
kernel/generic/include/log.h
r2f591127 r5828554 1 1 /* 2 * Copyright (c) 201 2 Petr Jerman2 * Copyright (c) 2013 Martin Sucha 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup libc29 /** @addtogroup genericlog 30 30 * @{ 31 31 */ 32 32 /** @file 33 * @brief AHCI interface definition.34 33 */ 35 34 36 #ifndef LIBC_DEVICE_AHCI_H_37 #define LIBC_DEVICE_AHCI_H_35 #ifndef KERN_LOG_H_ 36 #define KERN_LOG_H_ 38 37 39 #include <async.h> 40 #include <devman.h> 38 #include <typedefs.h> 39 #include <stdarg.h> 40 #include <printf/verify.h> 41 #include <abi/log.h> 42 #include <abi/klog.h> 41 43 42 extern async_sess_t* ahci_get_sess(devman_handle_t, char **); 44 extern void log_init(void); 45 extern void log_begin(log_facility_t, log_level_t); 46 extern void log_end(void); 47 extern int log_vprintf(const char *, va_list); 48 extern int log_printf(const char *, ...) 49 PRINTF_ATTRIBUTE(1, 2); 50 extern int log(log_facility_t, log_level_t, const char *, ...) 51 PRINTF_ATTRIBUTE(3, 4); 43 52 44 extern int ahci_get_sata_device_name(async_sess_t *, size_t, char *); 45 extern int ahci_get_num_blocks(async_sess_t *, uint64_t *); 46 extern int ahci_get_block_size(async_sess_t *, size_t *); 47 extern int ahci_read_blocks(async_sess_t *, uint64_t, size_t, void *); 48 extern int ahci_write_blocks(async_sess_t *, uint64_t, size_t, void *); 53 extern sysarg_t sys_klog(sysarg_t, void *buf, size_t size, 54 sysarg_t level); 49 55 50 #endif 56 #endif /* KERN_LOG_H_ */ 51 57 52 58 /** @} -
kernel/generic/include/synch/spinlock.h
r2f591127 r5828554 137 137 #ifdef CONFIG_DEBUG_SPINLOCK 138 138 139 #include < print.h>139 #include <log.h> 140 140 141 141 #define DEADLOCK_THRESHOLD 100000000 … … 146 146 if ((pname)++ > (value)) { \ 147 147 (pname) = 0; \ 148 printf("Deadlock probe %s: exceeded threshold %u\n" \ 148 log(LF_OTHER, LVL_WARN, \ 149 "Deadlock probe %s: exceeded threshold %u\n" \ 149 150 "cpu%u: function=%s, line=%u\n", \ 150 151 #pname, (value), CPU->id, __func__, __LINE__); \
Note:
See TracChangeset
for help on using the changeset viewer.
