Subversion Repositories HelenOS

Rev

Rev 4329 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4329 Rev 4335
Line 339... Line 339...
339
 * A public function which initializes input from the Serengeti console.
339
 * A public function which initializes input from the Serengeti console.
340
 */
340
 */
341
sgcn_instance_t *sgcnin_init(void)
341
sgcn_instance_t *sgcnin_init(void)
342
{
342
{
343
    sgcn_buffer_begin_init();
343
    sgcn_buffer_begin_init();
344
 
344
   
345
    sgcn_instance_t *instance =
345
    sgcn_instance_t *instance =
346
        malloc(sizeof(sgcn_instance_t), FRAME_ATOMIC);
346
        malloc(sizeof(sgcn_instance_t), FRAME_ATOMIC);
-
 
347
   
347
    if (!instance)
348
    if (instance) {
348
        return NULL;
-
 
349
 
-
 
350
    instance->srlnin = NULL;
349
        instance->srlnin = NULL;
351
    instance->thread = thread_create(ksgcnpoll, instance, TASK, 0,
350
        instance->thread = thread_create(ksgcnpoll, instance, TASK, 0,
352
        "ksgcnpoll", true);
351
            "ksgcnpoll", true);
-
 
352
       
353
    if (!instance->thread) {
353
        if (!instance->thread) {
354
        free(instance);
354
            free(instance);
355
        return NULL;
355
            return NULL;
-
 
356
        }
356
    }
357
    }
357
   
358
   
358
    return instance;
359
    return instance;
359
}
360
}
360
 
361