Fork me on GitHub

root/kernel/syscalls/sigpending.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. sys_sigpending

   1 /*
   2  * fiwix/kernel/syscalls/sigpending.c
   3  *
   4  * Copyright 2018, Jordi Sanfeliu. All rights reserved.
   5  * Distributed under the terms of the Fiwix License.
   6  */
   7 
   8 #include <fiwix/fs.h>
   9 #include <fiwix/signal.h>
  10 #include <fiwix/process.h>
  11 #include <fiwix/string.h>
  12 
  13 #ifdef __DEBUG__
  14 #include <fiwix/stdio.h>
  15 #endif /*__DEBUG__ */
  16 
  17 int sys_sigpending(__sigset_t *set)
  18 {
  19         int errno;
  20 
  21 #ifdef __DEBUG__
  22         printk("(pid %d) sys_sigpending(0x%08x) -> ", current->pid, set);
  23 #endif /*__DEBUG__ */
  24 
  25         if((errno = check_user_area(VERIFY_WRITE, set, sizeof(__sigset_t)))) {
  26                 return errno;
  27         }
  28         memcpy_b(set, &current->sigpending, sizeof(__sigset_t));
  29         return 0;
  30 }

/* [previous][next][first][last][top][bottom][index][help] */