/* sys/sigpendi.c (emx+gcc) -- Copyright (c) 1994-1996 by Eberhard Mattes */

#define INCL_DOSEXCEPTIONS
#include <os2emx.h>
#include <emx/syscalls.h>
#include "syscalls.h"

int __sigpending (sigset_t *set)
{
  thread_data *tp;

  /* TODO: Critical section */
  tp = SYS_THREAD;
  *set = tp->sig_blocked & tp->sig_pending;
  return 0;
}
