Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/main/kinit.c

    rc8cbd39 r181a746  
    6969#include <str.h>
    7070#include <sysinfo/stats.h>
    71 #include <sysinfo/sysinfo.h>
    7271#include <align.h>
    7372
     
    7877#include <synch/waitq.h>
    7978#include <synch/spinlock.h>
     79#include <synch/workqueue.h>
     80#include <synch/rcu.h>
    8081
    8182#define ALIVE_CHARS  4
     
    104105         */
    105106        thread_detach(THREAD);
    106        
     107
    107108        interrupts_disable();
     109       
     110        /* Start processing RCU callbacks. RCU is fully functional afterwards. */
     111        rcu_kinit_init();
     112       
     113        /*
     114         * Start processing work queue items. Some may have been queued during boot.
     115         */
     116        workq_global_worker_init();
    108117       
    109118#ifdef CONFIG_SMP
     
    180189        program_t programs[CONFIG_INIT_TASKS];
    181190       
    182         // FIXME: do not propagate arguments through sysinfo
    183         // but pass them directly to the tasks
    184         for (i = 0; i < init.cnt; i++) {
    185                 const char *arguments = init.tasks[i].arguments;
    186                 if (str_length(arguments) == 0)
    187                         continue;
    188                 if (str_length(init.tasks[i].name) == 0)
    189                         continue;
    190                 size_t arguments_size = str_size(arguments);
    191 
    192                 void *arguments_copy = malloc(arguments_size, 0);
    193                 if (arguments_copy == NULL)
    194                         continue;
    195                 memcpy(arguments_copy, arguments, arguments_size);
    196 
    197                 char item_name[CONFIG_TASK_NAME_BUFLEN + 15];
    198                 snprintf(item_name, CONFIG_TASK_NAME_BUFLEN + 15,
    199                     "init_args.%s", init.tasks[i].name);
    200 
    201                 sysinfo_set_item_data(item_name, NULL, arguments_copy, arguments_size);
    202         }
    203 
    204191        for (i = 0; i < init.cnt; i++) {
    205192                if (init.tasks[i].paddr % FRAME_SIZE) {
Note: See TracChangeset for help on using the changeset viewer.