Changeset 5b303ba in mainline for kernel/generic/src/printf/printf_core.c
- Timestamp:
- 2007-04-07T17:57:07Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3dbe2d1f
- Parents:
- be66dee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/printf/printf_core.c
rbe66dee r5b303ba 39 39 #include <putchar.h> 40 40 #include <print.h> 41 #include <synch/spinlock.h>42 41 #include <arch/arg.h> 43 #include <arch/asm.h>44 45 42 #include <arch.h> 46 47 SPINLOCK_INITIALIZE(printflock); /**< printf spinlock */48 43 49 44 #define __PRINTF_FLAG_PREFIX 0x00000001 /**< show prefixes 0x or 0*/ … … 459 454 int printf_core(const char *fmt, struct printf_spec *ps, va_list ap) 460 455 { 461 int irqpri;462 456 int i = 0, j = 0; /**< i is index of currently processed char from fmt, j is index to the first not printed nonformating character */ 463 457 int end; … … 473 467 474 468 counter = 0; 475 476 irqpri = interrupts_disable(); 477 spinlock_lock(&printflock); 478 469 479 470 while ((c = fmt[i])) { 480 471 /* control character */ … … 713 704 714 705 out: 715 spinlock_unlock(&printflock);716 interrupts_restore(irqpri);717 706 718 707 return counter;
Note:
See TracChangeset
for help on using the changeset viewer.