Lines Matching refs:buffer
43 #define CHILD_STDIO_COUNT(buffer) \ argument
44 *((unsigned int*) (buffer))
46 #define CHILD_STDIO_CRT_FLAGS(buffer, fd) \ argument
47 *((unsigned char*) (buffer) + sizeof(int) + fd)
49 #define CHILD_STDIO_HANDLE(buffer, fd) \ argument
50 ((void*) ((unsigned char*) (buffer) + \
53 CHILD_STDIO_COUNT((buffer)) + \
172 BYTE* buffer; in uv__stdio_create() local
187 buffer = (BYTE*) uv__malloc(CHILD_STDIO_SIZE(count)); in uv__stdio_create()
188 if (buffer == NULL) { in uv__stdio_create()
194 CHILD_STDIO_COUNT(buffer) = count; in uv__stdio_create()
196 CHILD_STDIO_CRT_FLAGS(buffer, i) = 0; in uv__stdio_create()
197 memset(CHILD_STDIO_HANDLE(buffer, i), 0xFF, sizeof(HANDLE)); in uv__stdio_create()
226 memcpy(CHILD_STDIO_HANDLE(buffer, i), &nul, sizeof(HANDLE)); in uv__stdio_create()
227 CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FDEV; in uv__stdio_create()
251 memcpy(CHILD_STDIO_HANDLE(buffer, i), &child_pipe, sizeof(HANDLE)); in uv__stdio_create()
252 CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FPIPE; in uv__stdio_create()
266 CHILD_STDIO_CRT_FLAGS(buffer, i) = 0; in uv__stdio_create()
267 memset(CHILD_STDIO_HANDLE(buffer, i), 0xFF, sizeof(HANDLE)); in uv__stdio_create()
276 CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN; in uv__stdio_create()
280 CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FPIPE; in uv__stdio_create()
285 CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FDEV; in uv__stdio_create()
294 CHILD_STDIO_CRT_FLAGS(buffer, i) = FOPEN | FDEV; in uv__stdio_create()
302 memcpy(CHILD_STDIO_HANDLE(buffer, i), &child_handle, sizeof(HANDLE)); in uv__stdio_create()
338 memcpy(CHILD_STDIO_HANDLE(buffer, i), &child_handle, sizeof(HANDLE)); in uv__stdio_create()
339 CHILD_STDIO_CRT_FLAGS(buffer, i) = crt_flags; in uv__stdio_create()
349 *buffer_ptr = buffer; in uv__stdio_create()
353 uv__stdio_destroy(buffer); in uv__stdio_create()
358 void uv__stdio_destroy(BYTE* buffer) { in uv__stdio_destroy() argument
361 count = CHILD_STDIO_COUNT(buffer); in uv__stdio_destroy()
363 HANDLE handle = uv__stdio_handle(buffer, i); in uv__stdio_destroy()
369 uv__free(buffer); in uv__stdio_destroy()
373 void uv__stdio_noinherit(BYTE* buffer) { in uv__stdio_noinherit() argument
376 count = CHILD_STDIO_COUNT(buffer); in uv__stdio_noinherit()
378 HANDLE handle = uv__stdio_handle(buffer, i); in uv__stdio_noinherit()
386 int uv__stdio_verify(BYTE* buffer, WORD size) { in uv__stdio_verify() argument
390 if (buffer == NULL) in uv__stdio_verify()
398 count = CHILD_STDIO_COUNT(buffer); in uv__stdio_verify()
410 WORD uv__stdio_size(BYTE* buffer) { in uv__stdio_size() argument
411 return (WORD) CHILD_STDIO_SIZE(CHILD_STDIO_COUNT((buffer))); in uv__stdio_size()
415 HANDLE uv__stdio_handle(BYTE* buffer, int fd) { in uv__stdio_handle() argument
417 memcpy(&handle, CHILD_STDIO_HANDLE(buffer, fd), sizeof(HANDLE)); in uv__stdio_handle()