Ignore:
Timestamp:
2019-05-28T19:24:14Z (5 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77de449e
Parents:
af5037d (diff), bebd154 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-05-28 19:24:14)
git-committer:
GitHub <noreply@…> (2019-05-28 19:24:14)
Message:

Merge pull request #161 from le-jzr/cxxcompat2

C++ compatibility improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/include/posix/signal.h

    raf5037d r52acfab  
    3939#include <ucontext.h>
    4040
    41 extern void __posix_default_signal_handler(int signo);
    42 extern void __posix_hold_signal_handler(int signo);
    43 extern void __posix_ignore_signal_handler(int signo);
    44 
    45 #undef SIG_DFL
    4641#define SIG_DFL ((void (*)(int)) __posix_default_signal_handler)
    47 #undef SIG_ERR
    4842#define SIG_ERR ((void (*)(int)) NULL)
    49 #undef SIG_HOLD
    5043#define SIG_HOLD ((void (*)(int)) __posix_hold_signal_handler)
    51 #undef SIG_IGN
    5244#define SIG_IGN ((void (*)(int)) __posix_ignore_signal_handler)
    5345
    54 typedef struct {
    55         int si_signo;
    56         int si_code;
    57 
    58         int si_errno;
    59 
    60         pid_t si_pid;
    61         uid_t si_uid;
    62         void *si_addr;
    63         int si_status;
    64 
    65         long si_band;
    66 
    67         union sigval si_value;
    68 } siginfo_t;
    69 
    70 struct sigaction {
    71         void (*sa_handler)(int);
    72         sigset_t sa_mask;
    73         int sa_flags;
    74         void (*sa_sigaction)(int, siginfo_t *, void *);
    75 };
    76 
    7746/* Values of sigevent::sigev_notify */
    78 #undef SIGEV_NONE
    79 #undef SIGEV_SIGNAL
    80 #undef SIGEV_THREAD
    8147#define SIGEV_NONE 0
    8248#define SIGEV_SIGNAL 0
    8349#define SIGEV_THREAD 0
    8450
    85 #undef SIGRT_MIN
    86 #undef SIGRT_MAX
    8751#define SIGRT_MIN 0
    8852#define SIGRT_MAX 0
    8953
    90 #undef SIG_BLOCK
    91 #undef SIG_UNBLOCK
    92 #undef SIG_SETMASK
    9354#define SIG_BLOCK 0
    9455#define SIG_UNBLOCK 1
    9556#define SIG_SETMASK 2
    9657
    97 #undef SA_NOCLDSTOP
    98 #undef SA_ONSTACK
    99 #undef SA_RESETHAND
    100 #undef SA_RESTART
    101 #undef SA_SIGINFO
    102 #undef SA_NOCLDWAIT
    103 #undef SA_NODEFER
    10458#define SA_NOCLDSTOP (1 << 0)
    10559#define SA_ONSTACK (1 << 1)
     
    11064#define SA_NODEFER (1 << 6)
    11165
    112 #undef SS_ONSTACK
    113 #undef SS_DISABLE
    11466#define SS_ONSTACK 0
    11567#define SS_DISABLE 0
    11668
    117 #undef MINSIGSTKSZ
    118 #undef SIGSTKSZ
    11969#define MINSIGSTKSZ 0
    12070#define SIGSTKSZ 0
     71
     72__C_DECLS_BEGIN;
     73
     74extern void __posix_default_signal_handler(int signo);
     75extern void __posix_hold_signal_handler(int signo);
     76extern void __posix_ignore_signal_handler(int signo);
     77
     78typedef struct {
     79        int si_signo;
     80        int si_code;
     81
     82        int si_errno;
     83
     84        pid_t si_pid;
     85        uid_t si_uid;
     86        void *si_addr;
     87        int si_status;
     88
     89        long si_band;
     90
     91        union sigval si_value;
     92} siginfo_t;
     93
     94struct sigaction {
     95        void (*sa_handler)(int);
     96        sigset_t sa_mask;
     97        int sa_flags;
     98        void (*sa_sigaction)(int, siginfo_t *, void *);
     99};
    121100
    122101/* Full POSIX set */
     
    245224    sigset_t *__restrict__ oset);
    246225
     226__C_DECLS_END;
     227
    247228#endif /* POSIX_SIGNAL_H_ */
    248229
Note: See TracChangeset for help on using the changeset viewer.