Lines Matching defs:con

5   | This source file is subject to version 2.0 of the Apache license,    |  in arcan_shmifext_defaults()
11 | license@swoole.com so we can mail you a copy immediately. | in arcan_shmifext_defaults()
21 #include "swoole_memory.h" in arcan_shmifext_defaults()
22 #include "swoole_channel.h" in arcan_shmifext_defaults()
23 #include "swoole_lock.h" in arcan_shmifext_defaults()
24 #include "swoole_pipe.h" in arcan_shmifext_defaults()
25 in arcan_shmifext_defaults()
35 Channel *Channel::make(size_t size, size_t maxlen, int flags) { in arcan_shmifext_defaults()
39 // use shared memory in arcan_shmifext_defaults()
54 Channel *object = (Channel *) mem; in arcan_shmifext_defaults()
80 return object; in arcan_shmifext_defaults()
81 } in arcan_shmifext_defaults()
82 in arcan_shmifext_defaults()
83 /** in arcan_shmifext_defaults()
84 * push data(no lock) in arcan_shmifext_defaults()
89 return SW_ERR; in arcan_shmifext_defaults()
90 } in arcan_shmifext_defaults()
91 ChannelSlice *item; in arcan_shmifext_defaults()
95 // no enough memory space in arcan_shmifext_defaults()
99 item = (ChannelSlice *) ((char *) mem + tail); in arcan_shmifext_defaults()
100 tail += msize; in arcan_shmifext_defaults()
104 if (tail >= (off_t) size) { in arcan_shmifext_defaults()
105 tail = 0; in arcan_shmifext_defaults()
110 bytes += data_length; in arcan_shmifext_defaults()
111 item->length = data_length; in arcan_shmifext_defaults()
119 int Channel::out(void *out_buf, int buffer_length) { in arcan_shmifext_defaults()
124 ChannelSlice *item = (ChannelSlice *) ((char *) mem + head); in arcan_shmifext_defaults()
133 bytes -= item->length; in arcan_shmifext_defaults()
134 return item->length; in arcan_shmifext_defaults()
140 int Channel::peek(void *out, int buffer_length) { in arcan_shmifext_defaults()
147 ChannelSlice *item = (ChannelSlice *) ((char *) mem + head); in arcan_shmifext_defaults()
149 memcpy(out, item->data, item->length); in arcan_shmifext_defaults()
150 length = item->length; in arcan_shmifext_defaults()