Mercurial > hg > nginx
comparison src/os/unix/ngx_files.h @ 6441:9fd738b85fad
Threads: task pointer stored in ngx_file_t.
This simplifies the interface of the ngx_thread_read() function.
Additionally, most of the thread operations now explicitly set
file->thread_task, file->thread_handler and file->thread_ctx,
to facilitate use of thread operations in other places.
(Potential problems remain with sendfile in threads though - it uses
file->thread_handler as set in ngx_output_chain(), and it should not
be overwritten to an incompatible one.)
In collaboration with Valentin Bartenev.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 18 Mar 2016 06:43:52 +0300 |
parents | db138b3b645e |
children | 6e10518f95d8 |
comparison
equal
deleted
inserted
replaced
6440:248aa2757332 | 6441:9fd738b85fad |
---|---|
383 extern ngx_uint_t ngx_file_aio; | 383 extern ngx_uint_t ngx_file_aio; |
384 | 384 |
385 #endif | 385 #endif |
386 | 386 |
387 #if (NGX_THREADS) | 387 #if (NGX_THREADS) |
388 ssize_t ngx_thread_read(ngx_thread_task_t **taskp, ngx_file_t *file, | 388 ssize_t ngx_thread_read(ngx_file_t *file, u_char *buf, size_t size, |
389 u_char *buf, size_t size, off_t offset, ngx_pool_t *pool); | 389 off_t offset, ngx_pool_t *pool); |
390 #endif | 390 #endif |
391 | 391 |
392 | 392 |
393 #endif /* _NGX_FILES_H_INCLUDED_ */ | 393 #endif /* _NGX_FILES_H_INCLUDED_ */ |