Changeset 3dbe2d1f in mainline for uspace/libc/generic/io/vprintf.c
- Timestamp:
- 2007-04-07T18:00:18Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2a98e58
- Parents:
- 5b303ba
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/libc/generic/io/vprintf.c
r5b303ba r3dbe2d1f 37 37 #include <unistd.h> 38 38 #include <io/printf_core.h> 39 #include <futex.h> 39 40 40 int vprintf_write(const char *str, size_t count, void *unused);41 atomic_t printf_futex = FUTEX_INITIALIZER; 41 42 42 int vprintf_write(const char *str, size_t count, void *unused)43 static int vprintf_write(const char *str, size_t count, void *unused) 43 44 { 44 45 return write(1, str, count); … … 52 53 int vprintf(const char *fmt, va_list ap) 53 54 { 54 struct printf_spec ps = {(int(*)(void *, size_t, void *))vprintf_write, NULL}; 55 return printf_core(fmt, &ps, ap); 56 55 struct printf_spec ps = {(int(*)(void *, size_t, void *)) vprintf_write, NULL}; 56 57 futex_down(&printf_futex); 58 int ret = printf_core(fmt, &ps, ap); 59 futex_up(&printf_futex); 60 61 return ret; 57 62 } 58 63
Note:
See TracChangeset
for help on using the changeset viewer.