Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4343 → Rev 4344

/branches/dynload/kernel/generic/src/console/console.c
51,24 → 51,24
#define KLOG_SIZE PAGE_SIZE
#define KLOG_LATENCY 8
 
/**< Kernel log cyclic buffer */
/** Kernel log cyclic buffer */
static char klog[KLOG_SIZE] __attribute__ ((aligned (PAGE_SIZE)));
 
/**< Kernel log initialized */
/** Kernel log initialized */
static bool klog_inited = false;
/**< First kernel log characters */
/** First kernel log characters */
static index_t klog_start = 0;
/**< Number of valid kernel log characters */
/** Number of valid kernel log characters */
static size_t klog_len = 0;
/**< Number of stored (not printed) kernel log characters */
/** Number of stored (not printed) kernel log characters */
static size_t klog_stored = 0;
/**< Number of stored kernel log characters for uspace */
/** Number of stored kernel log characters for uspace */
static size_t klog_uspace = 0;
 
/**< Silent output */
static bool silent = false;
/** Silence output */
bool silent = false;
 
/**< Kernel log spinlock */
/** Kernel log spinlock */
SPINLOCK_INITIALIZE(klog_lock);
 
/** Physical memory area used for klog buffer */
101,7 → 101,7
*
* @return Always returns IRQ_DECLINE.
*/
static irq_ownership_t klog_claim(void *instance)
static irq_ownership_t klog_claim(irq_t *irq)
{
return IRQ_DECLINE;
}
/branches/dynload/kernel/generic/src/console/cmd.c
514,23 → 514,31
*/
int cmd_help(cmd_arg_t *argv)
{
link_t *cur;
 
spinlock_lock(&cmd_lock);
link_t *cur;
size_t len = 0;
for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) {
cmd_info_t *hlp;
hlp = list_get_instance(cur, cmd_info_t, link);
spinlock_lock(&hlp->lock);
if (strlen(hlp->name) > len)
len = strlen(hlp->name);
spinlock_unlock(&hlp->lock);
}
for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) {
cmd_info_t *hlp;
hlp = list_get_instance(cur, cmd_info_t, link);
spinlock_lock(&hlp->lock);
printf("%s - %s\n", hlp->name, hlp->description);
 
printf("%-*s %s\n", len, hlp->name, hlp->description);
spinlock_unlock(&hlp->lock);
}
spinlock_unlock(&cmd_lock);
 
return 1;
}
 
948,18 → 956,23
*/
int cmd_tests(cmd_arg_t *argv)
{
size_t len = 0;
test_t *test;
for (test = tests; test->name != NULL; test++) {
if (strlen(test->name) > len)
len = strlen(test->name);
}
for (test = tests; test->name != NULL; test++)
printf("%-10s %s%s\n", test->name, test->desc, (test->safe ? "" : " (unsafe)"));
printf("%-*s %s%s\n", len, test->name, test->desc, (test->safe ? "" : " (unsafe)"));
printf("%-10s Run all safe tests\n", "*");
printf("%-*s Run all safe tests\n", len, "*");
return 1;
}
 
static bool run_test(const test_t *test)
{
printf("%s\t\t%s\n", test->name, test->desc);
printf("%s (%s)\n", test->name, test->desc);
/* Update and read thread accounting
for benchmarking */
/branches/dynload/kernel/generic/src/console/kconsole.c
103,7 → 103,7
* @return Always returns IRQ_DECLINE.
*
*/
static irq_ownership_t kconsole_claim(void *instance)
static irq_ownership_t kconsole_claim(irq_t *irq)
{
return IRQ_DECLINE;
}