Changeset c0d814a in mainline for kernel/generic/src/printf/vprintf.c


Ignore:
Timestamp:
2025-04-10T20:02:30Z (4 days ago)
Author:
GitHub <noreply@…>
Children:
b8b031f
Parents:
a92290d (diff), 90dd8aee (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.
git-author:
Wayne Thornton <wmthornton-dev@…> (2025-04-10 20:02:30)
git-committer:
GitHub <noreply@…> (2025-04-10 20:02:30)
Message:

Merge pull request #6 from HelenOS/master

Merge pending changes from downstream helenos/master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/printf/vprintf.c

    ra92290d rc0d814a  
    3333 */
    3434
     35#include <arch/asm.h>
     36#include <console/console.h>
    3537#include <print.h>
    3638#include <printf/printf_core.h>
    3739#include <putchar.h>
     40#include <str.h>
    3841#include <synch/spinlock.h>
    39 #include <arch/asm.h>
    4042#include <typedefs.h>
    41 #include <str.h>
    4243
    4344static int vprintf_str_write(const char *str, size_t size, void *data)
     
    7475        char32_t uc;
    7576
     77        console_lock();
     78
    7679        while ((uc = str_decode(str, &offset, STR_NO_LIMIT)) != 0) {
    7780                putuchar(uc);
     
    8083
    8184        putuchar('\n');
     85
     86        console_unlock();
    8287        return chars;
    8388}
     
    9196        };
    9297
    93         return printf_core(fmt, &ps, ap);
     98        console_lock();
     99        int ret = printf_core(fmt, &ps, ap);
     100        console_unlock();
     101        return ret;
    94102}
    95103
Note: See TracChangeset for help on using the changeset viewer.