Mercurial > hg > nginx
comparison src/event/modules/ngx_eventport_module.c @ 4798:29928279ec9f stable-1.2
Merge of r4760, r4761: -Wmissing-prototypes.
Fixed compilation with -Wmissing-prototypes. Added a commented
out -Wmissing-prototypes to CFLAGS. It is commented out to not break
builds with 3rd party modules.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 06 Aug 2012 17:07:28 +0000 |
parents | 67653855682e |
children | 6362bd26e4b0 |
comparison
equal
deleted
inserted
replaced
4797:d1cea70248c7 | 4798:29928279ec9f |
---|---|
12 | 12 |
13 #if (NGX_TEST_BUILD_EVENTPORT) | 13 #if (NGX_TEST_BUILD_EVENTPORT) |
14 | 14 |
15 #define ushort_t u_short | 15 #define ushort_t u_short |
16 #define uint_t u_int | 16 #define uint_t u_int |
17 | |
18 #ifndef CLOCK_REALTIME | |
19 #define CLOCK_REALTIME 0 | |
20 typedef int clockid_t; | |
21 typedef void * timer_t; | |
22 #endif | |
17 | 23 |
18 /* Solaris declarations */ | 24 /* Solaris declarations */ |
19 | 25 |
20 #define PORT_SOURCE_AIO 1 | 26 #define PORT_SOURCE_AIO 1 |
21 #define PORT_SOURCE_TIMER 2 | 27 #define PORT_SOURCE_TIMER 2 |
22 #define PORT_SOURCE_USER 3 | 28 #define PORT_SOURCE_USER 3 |
23 #define PORT_SOURCE_FD 4 | 29 #define PORT_SOURCE_FD 4 |
24 #define PORT_SOURCE_ALERT 5 | 30 #define PORT_SOURCE_ALERT 5 |
25 #define PORT_SOURCE_MQ 6 | 31 #define PORT_SOURCE_MQ 6 |
26 | 32 |
33 #ifndef ETIME | |
27 #define ETIME 64 | 34 #define ETIME 64 |
35 #endif | |
28 | 36 |
29 #define SIGEV_PORT 4 | 37 #define SIGEV_PORT 4 |
30 | 38 |
31 typedef struct { | 39 typedef struct { |
32 int portev_events; /* event data is source specific */ | 40 int portev_events; /* event data is source specific */ |
48 struct timespec it_value; /* timer expiration */ | 56 struct timespec it_value; /* timer expiration */ |
49 } itimerspec_t; | 57 } itimerspec_t; |
50 | 58 |
51 #endif | 59 #endif |
52 | 60 |
61 int port_create(void); | |
62 | |
53 int port_create(void) | 63 int port_create(void) |
54 { | 64 { |
55 return -1; | 65 return -1; |
56 } | 66 } |
67 | |
68 | |
69 int port_associate(int port, int source, uintptr_t object, int events, | |
70 void *user); | |
57 | 71 |
58 int port_associate(int port, int source, uintptr_t object, int events, | 72 int port_associate(int port, int source, uintptr_t object, int events, |
59 void *user) | 73 void *user) |
60 { | 74 { |
61 return -1; | 75 return -1; |
62 } | 76 } |
63 | 77 |
78 | |
79 int port_dissociate(int port, int source, uintptr_t object); | |
80 | |
64 int port_dissociate(int port, int source, uintptr_t object) | 81 int port_dissociate(int port, int source, uintptr_t object) |
65 { | 82 { |
66 return -1; | 83 return -1; |
67 } | 84 } |
85 | |
86 | |
87 int port_getn(int port, port_event_t list[], uint_t max, uint_t *nget, | |
88 struct timespec *timeout); | |
68 | 89 |
69 int port_getn(int port, port_event_t list[], uint_t max, uint_t *nget, | 90 int port_getn(int port, port_event_t list[], uint_t max, uint_t *nget, |
70 struct timespec *timeout) | 91 struct timespec *timeout) |
71 { | 92 { |
72 return -1; | 93 return -1; |
73 } | 94 } |
74 | 95 |
96 | |
97 int timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); | |
98 | |
75 int timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid) | 99 int timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid) |
76 { | 100 { |
77 return -1; | 101 return -1; |
78 } | 102 } |
103 | |
104 | |
105 int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, | |
106 struct itimerspec *ovalue); | |
79 | 107 |
80 int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, | 108 int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, |
81 struct itimerspec *ovalue) | 109 struct itimerspec *ovalue) |
82 { | 110 { |
83 return -1; | 111 return -1; |
84 } | 112 } |
113 | |
114 | |
115 int timer_delete(timer_t timerid); | |
85 | 116 |
86 int timer_delete(timer_t timerid) | 117 int timer_delete(timer_t timerid) |
87 { | 118 { |
88 return -1; | 119 return -1; |
89 } | 120 } |