-
- Downloads
utils: Wrap socket() and pipe() to reduce syscalls
Some platforms provide an implementation of socket() and pipe2() that allow the caller to specify that the resulting file descriptors should be non-blocking. Using these allows us to potentially elide 3 calls into 1 by avoiding extraneous calls to fcntl() to set the O_NONBLOCK flag afterwards. In passing, change ast_alertpipe_init() to use pipe2() directly instead of the wrapper if it is available. Change-Id: I3ebe654fb549587537161506c6c950f4ab298bb0
Showing
- configure 66 additions, 7 deletionsconfigure
- configure.ac 22 additions, 1 deletionconfigure.ac
- include/asterisk/autoconfig.h.in 6 additions, 0 deletionsinclude/asterisk/autoconfig.h.in
- include/asterisk/utils.h 34 additions, 0 deletionsinclude/asterisk/utils.h
- main/alertpipe.c 11 additions, 0 deletionsmain/alertpipe.c
- main/utils.c 36 additions, 0 deletionsmain/utils.c
Loading
Please register or sign in to comment