mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Style.
This commit is contained in:
@@ -276,26 +276,26 @@ typedef volatile ngx_atomic_uint_t ngx_atomic_t;
|
||||
|
||||
static ngx_inline ngx_atomic_uint_t
|
||||
ngx_atomic_cmp_set(ngx_atomic_t *lock, ngx_atomic_uint_t old,
|
||||
ngx_atomic_uint_t set)
|
||||
ngx_atomic_uint_t set)
|
||||
{
|
||||
if (*lock == old) {
|
||||
*lock = set;
|
||||
return 1;
|
||||
}
|
||||
if (*lock == old) {
|
||||
*lock = set;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static ngx_inline ngx_atomic_int_t
|
||||
ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add)
|
||||
{
|
||||
ngx_atomic_int_t old;
|
||||
ngx_atomic_int_t old;
|
||||
|
||||
old = *value;
|
||||
*value += add;
|
||||
old = *value;
|
||||
*value += add;
|
||||
|
||||
return old;
|
||||
return old;
|
||||
}
|
||||
|
||||
#define ngx_memory_barrier()
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
|
||||
|
||||
typedef struct {
|
||||
ngx_uint_t command;
|
||||
ngx_pid_t pid;
|
||||
ngx_int_t slot;
|
||||
ngx_fd_t fd;
|
||||
ngx_uint_t command;
|
||||
ngx_pid_t pid;
|
||||
ngx_int_t slot;
|
||||
ngx_fd_t fd;
|
||||
} ngx_channel_t;
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,6 @@
|
||||
/
|
||||
/ ld.so.1: nginx: fatal: hardware capability unsupported: 0x2000 [ PAUSE ]
|
||||
|
||||
.inline ngx_cpu_pause,0
|
||||
rep; nop
|
||||
.end
|
||||
.inline ngx_cpu_pause,0
|
||||
rep; nop
|
||||
.end
|
||||
|
||||
@@ -39,6 +39,6 @@
|
||||
/
|
||||
/ ld.so.1: nginx: fatal: hardware capability unsupported: 0x2000 [ PAUSE ]
|
||||
|
||||
.inline ngx_cpu_pause,0
|
||||
rep; nop
|
||||
.end
|
||||
.inline ngx_cpu_pause,0
|
||||
rep; nop
|
||||
.end
|
||||
|
||||
@@ -27,16 +27,16 @@ typedef volatile ngx_atomic_uint_t ngx_atomic_t;
|
||||
/* the new SDK headers */
|
||||
|
||||
#define ngx_atomic_cmp_set(lock, old, set) \
|
||||
((ngx_atomic_uint_t) InterlockedCompareExchange((long *) lock, set, old) \
|
||||
== old)
|
||||
((ngx_atomic_uint_t) InterlockedCompareExchange((long *) lock, set, old) \
|
||||
== old)
|
||||
|
||||
#else
|
||||
|
||||
/* the old MS VC6.0SP2 SDK headers */
|
||||
|
||||
#define ngx_atomic_cmp_set(lock, old, set) \
|
||||
(InterlockedCompareExchange((void **) lock, (void *) set, (void *) old) \
|
||||
== (void *) old)
|
||||
(InterlockedCompareExchange((void **) lock, (void *) set, (void *) old) \
|
||||
== (void *) old)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -233,11 +233,11 @@ ngx_overlapped_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
|
||||
|
||||
} else if (ngx_event_flags & NGX_USE_IOCP_EVENT) {
|
||||
|
||||
/*
|
||||
* if a socket was bound with I/O completion port then
|
||||
* GetQueuedCompletionStatus() would anyway return its status
|
||||
* despite that WSASend() was already complete
|
||||
*/
|
||||
/*
|
||||
* if a socket was bound with I/O completion port then
|
||||
* GetQueuedCompletionStatus() would anyway return its status
|
||||
* despite that WSASend() was already complete
|
||||
*/
|
||||
|
||||
wev->active = 1;
|
||||
return in;
|
||||
|
||||
Reference in New Issue
Block a user