Main Page | Directories | File List | Globals

sigaction.c File Reference

#include <agnix/agnix.h>
#include <agnix/console.h>
#include <agnix/tasks.h>
#include <agnix/signals.h>
#include <agnix/spinlock.h>
#include <agnix/memory.h>
#include <agnix/errno.h>

Include dependency graph for sigaction.c:

Go to the source code of this file.

Functions

int do_sys_sigaction (int sig, struct sigaction_s *act, struct sigaction_s *oldact)


Function Documentation

int do_sys_sigaction int  sig,
struct sigaction_s *  act,
struct sigaction_s *  oldact
 

Definition at line 22 of file sigaction.c.

References memcpy().

Referenced by SYS_CALL().

00023 {
00024     struct task_s *task = current_task;
00025 
00026     if (act == NULL && oldact == NULL)
00027         return -EINVAL;
00028 
00029     spin_lock_irq(&(task->signals_act.lock));
00030     
00031     if (oldact != NULL)
00032         memcpy(oldact, &(task->signals_act.sigaction[sig]), sizeof(struct sigaction_s));
00033 
00034     if (act != NULL)
00035         memcpy(&(task->signals_act.sigaction[sig]), act, sizeof(struct sigaction_s));
00036 
00037     spin_unlock_irq(&(task->signals_act.lock));
00038 
00039     return 0;
00040 }

Here is the call graph for this function:

Dokumentacje wygenerowano programem Doxygen 1.4.2 dla projektu Agnix