Skip to content

Commit 4bc082e

Browse files
committed
[libc] move struct sigevent to libc_signal.h file.
1 parent 5a95d35 commit 4bc082e

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

components/libc/pthreads/pthread.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -276,27 +276,6 @@ int pthread_barrier_init(pthread_barrier_t *barrier,
276276

277277
int pthread_barrier_wait(pthread_barrier_t *barrier);
278278

279-
/* Signal Generation and Delivery, P1003.1b-1993, p. 63
280-
NOTE: P1003.1c/D10, p. 34 adds sigev_notify_function and
281-
sigev_notify_attributes to the sigevent structure. */
282-
#if 0
283-
union sigval
284-
{
285-
int sival_int; /* Integer signal value */
286-
void *sival_ptr; /* Pointer signal value */
287-
};
288-
#endif
289-
290-
struct sigevent
291-
{
292-
int sigev_notify; /* Notification type */
293-
int sigev_signo; /* Signal number */
294-
union sigval sigev_value; /* Signal value */
295-
void (*sigev_notify_function)( union sigval );
296-
/* Notification function */
297-
pthread_attr_t *sigev_notify_attributes; /* Notification Attributes */
298-
};
299-
300279
/* posix clock and timer */
301280
#define MILLISECOND_PER_SECOND 1000UL
302281
#define MICROSECOND_PER_SECOND 1000000UL

components/libc/signal/posix_signal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ struct sigevent {
9797
int sigev_signo;
9898
union sigval sigev_value;
9999
100-
101100
void (*sigev_notify_function)( union sigval );
102101
103102
pthread_attr_t *sigev_notify_attributes;

include/libc/libc_signal.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,26 @@
3030
extern "C" {
3131
#endif
3232

33+
/* Signal Generation and Delivery, P1003.1b-1993, p. 63
34+
NOTE: P1003.1c/D10, p. 34 adds sigev_notify_function and
35+
sigev_notify_attributes to the sigevent structure. */
36+
3337
union sigval
3438
{
3539
int sival_int; /* Integer signal value */
3640
void *sival_ptr; /* Pointer signal value */
3741
};
3842

43+
struct sigevent
44+
{
45+
int sigev_notify; /* Notification type */
46+
int sigev_signo; /* Signal number */
47+
union sigval sigev_value; /* Signal value */
48+
void (*sigev_notify_function)( union sigval );
49+
/* Notification function */
50+
void *sigev_notify_attributes; /* Notification Attributes, really pthread_attr_t */
51+
};
52+
3953
struct siginfo
4054
{
4155
rt_uint8_t si_signo;

0 commit comments

Comments
 (0)