Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ngx_os.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) Igor Sysoev
4  * Copyright (C) Nginx, Inc.
5  */
6 
7 
8 #ifndef _NGX_OS_H_INCLUDED_
9 #define _NGX_OS_H_INCLUDED_
10 
11 
12 #include <ngx_config.h>
13 #include <ngx_core.h>
14 
15 
16 #define NGX_IO_SENDFILE 1
17 
18 
19 typedef ssize_t (*ngx_recv_pt)(ngx_connection_t *c, u_char *buf, size_t size);
20 typedef ssize_t (*ngx_recv_chain_pt)(ngx_connection_t *c, ngx_chain_t *in);
21 typedef ssize_t (*ngx_send_pt)(ngx_connection_t *c, u_char *buf, size_t size);
22 typedef ngx_chain_t *(*ngx_send_chain_pt)(ngx_connection_t *c, ngx_chain_t *in,
23  off_t limit);
24 
25 typedef struct {
32 } ngx_os_io_t;
33 
34 
36 void ngx_os_status(ngx_log_t *log);
41 
42 
43 ssize_t ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size);
45 ssize_t ngx_udp_unix_recv(ngx_connection_t *c, u_char *buf, size_t size);
46 ssize_t ngx_unix_send(ngx_connection_t *c, u_char *buf, size_t size);
48  off_t limit);
49 
50 #if (NGX_HAVE_AIO)
51 ssize_t ngx_aio_read(ngx_connection_t *c, u_char *buf, size_t size);
53 ssize_t ngx_aio_write(ngx_connection_t *c, u_char *buf, size_t size);
55  off_t limit);
56 #endif
57 
58 
59 extern ngx_os_io_t ngx_os_io;
60 extern ngx_int_t ngx_ncpu;
64 
65 
66 #if (NGX_FREEBSD)
67 #include <ngx_freebsd.h>
68 
69 
70 #elif (NGX_LINUX)
71 #include <ngx_linux.h>
72 
73 
74 #elif (NGX_SOLARIS)
75 #include <ngx_solaris.h>
76 
77 
78 #elif (NGX_DARWIN)
79 #include <ngx_darwin.h>
80 #endif
81 
82 
83 #endif /* _NGX_OS_H_INCLUDED_ */