Kernel updates since December 2009

This commit is contained in:
Bahadir Balban
2010-03-25 01:12:40 +02:00
parent 16818191b3
commit 74b5963fcb
487 changed files with 22477 additions and 3857 deletions

View File

@@ -29,6 +29,8 @@
********************************************************************/
#include <stdarg.h> /* for va_list, ... comes with gcc */
#include <l4/lib/printk.h>
#include <l4/lib/mutex.h>
/* FIXME: LICENSE LICENCE */
typedef unsigned int word_t;
@@ -422,6 +424,8 @@ int do_printk(char* format_p, va_list args)
return n;
}
DECLARE_SPINLOCK(printk_lock);
/**
* Flexible print function
*
@@ -435,9 +439,14 @@ int printk(char *format, ...)
{
va_list args;
int i;
unsigned long irqstate;
va_start(args, format);
spin_lock_irq(&printk_lock, &irqstate);
i = do_printk(format, args);
spin_unlock_irq(&printk_lock, irqstate);
va_end(args);
return i;
};

View File

@@ -3,12 +3,11 @@
*
* Copyright (C) 2007 Bahadir Balban
*/
#include INC_PLAT(uart.h)
void putc(char c)
{
if (c == '\n')
uart_putc('\r');
uart_putc(c);
uart_tx_char(PLATFORM_CONSOLE_VBASE, '\r');
uart_tx_char(PLATFORM_CONSOLE_VBASE, c);
}

View File

@@ -1,30 +1,18 @@
/*
* Copyright 2008-2010 B Labs Ltd.
*/
void *_memset(void *p, int c, int size);
void *_memcpy(void *d, void *s, int size);
void *memset(void *p, int c, int size)
{
char ch;
char *pp;
pp = (char *)p;
ch = (char)c;
for (int i = 0; i < size; i++) {
*pp++ = ch;
}
return p;
return _memset(p, c, size);
}
void *memcpy(void *d, void *s, int size)
{
char *dst = (char *)d;
char *src = (char *)s;
for (int i = 0; i < size; i++) {
*dst = *src;
dst++;
src++;
}
return d;
return _memcpy(d, s, size);
}

View File

@@ -154,6 +154,7 @@ void wake_up(struct waitqueue_head *wqh, unsigned int flags)
BUG_ON(wqh->sleepers < 0);
spin_lock_irq(&wqh->slock, &irqflags);
if (wqh->sleepers > 0) {
struct waitqueue *wq = link_to_struct(wqh->task_list.next,
struct waitqueue,
@@ -165,7 +166,7 @@ void wake_up(struct waitqueue_head *wqh, unsigned int flags)
task_unset_wqh(sleeper);
if (flags & WAKEUP_INTERRUPT)
sleeper->flags |= TASK_INTERRUPTED;
//printk("(%d) Waking up (%d)\n", current->tid, sleeper->tid);
// printk("(%d) Waking up (%d)\n", current->tid, sleeper->tid);
spin_unlock_irq(&wqh->slock, irqflags);
if (flags & WAKEUP_SYNC)