blob: 777c736ad320d1f79f373d96f5537332cde22453 [file] [log] [blame]
/*
* Copyright (c) 2018, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <spinlock.h>
#include <stdarg.h>
#include <stdio.h>
/* Lock to avoid concurrent accesses to the serial console */
static spinlock_t printf_lock;
void mp_printf(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
spin_lock(&printf_lock);
vprintf(fmt, args);
spin_unlock(&printf_lock);
va_end(args);
}