Subversion Repositories HelenOS

Rev

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

Rev 4327 Rev 4581
Line 277... Line 277...
277
/**
277
/**
278
 * Grabs the input for kernel.
278
 * Grabs the input for kernel.
279
 */
279
 */
280
void sgcn_grab(void)
280
void sgcn_grab(void)
281
{
281
{
282
    kbd_disabled = true;
282
    kbd_disabled = false;
283
}
283
}
284
 
284
 
285
/**
285
/**
286
 * Releases the input so that userspace can use it.
286
 * Releases the input so that userspace can use it.
287
 */
287
 */
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