Revert "Merging in 1.0.2."

This reverts commit 50cf3276e7.
This commit is contained in:
Geoffrey Challen
2017-01-09 22:52:13 -05:00
parent 50cf3276e7
commit e318e3171e
118 changed files with 3158 additions and 1350 deletions

View File

@@ -39,6 +39,8 @@
#include <mainbus.h>
#include <vfs.h> // for vfs_sync()
#include <lamebus/ltrace.h> // for ltrace_stop()
#include <kern/secret.h>
#include <test.h>
/* Flags word for DEBUG() macro. */
@@ -90,13 +92,14 @@ console_send(void *junk, const char *data, size_t len)
}
/*
* Printf to the console.
* kprintf and tprintf helper function.
*/
static
inline
int
kprintf(const char *fmt, ...)
__kprintf(const char *fmt, va_list ap)
{
int chars;
va_list ap;
bool dolock;
dolock = kprintf_lock != NULL
@@ -111,9 +114,7 @@ kprintf(const char *fmt, ...)
spinlock_acquire(&kprintf_spinlock);
}
va_start(ap, fmt);
chars = __vprintf(console_send, NULL, fmt, ap);
va_end(ap);
if (dolock) {
lock_release(kprintf_lock);
@@ -125,6 +126,22 @@ kprintf(const char *fmt, ...)
return chars;
}
/*
* Printf to the console.
*/
int
kprintf(const char *fmt, ...)
{
int chars;
va_list ap;
va_start(ap, fmt);
chars = __kprintf(fmt, ap);
va_end(ap);
return chars;
}
/*
* panic() is for fatal errors. It prints the printf arguments it's
* passed and then halts the system.