cbus: simplify cbus_call interface
All of the current cbus_call() invocations pass TIMEOUT_INFINITY as a timeout and don't provide any free_cb. Since commit bd6fb06a ("core: allow spurious wakeups in cbus_call") cbus_call() with TIMEOUT_INFINITY can't be interrupted at all, so there's no point to pass free_cb for it. Let's simplify cbus_call() usage by removing the last two arguments, free_cb and timeout. These arguments will be present in a new function, cbus_call_timeout. Simplify all current cbus_call() usages which have TIMEOUT_INFINITY. Remove free_cb, where present, and stop allocating call messages dynamically, since static allocation works just fine now. NO_DOC=refactoring NO_CHANGELOG=refactoring
Showing
- src/box/applier.cc 9 additions, 41 deletionssrc/box/applier.cc
- src/box/iproto.cc 2 additions, 3 deletionssrc/box/iproto.cc
- src/box/vy_run.c 1 addition, 3 deletionssrc/box/vy_run.c
- src/box/wal.c 13 additions, 21 deletionssrc/box/wal.c
- src/lib/core/cbus.c 3 additions, 5 deletionssrc/lib/core/cbus.c
- src/lib/core/cbus.h 12 additions, 3 deletionssrc/lib/core/cbus.h
- test/unit/cbus_call.c 6 additions, 10 deletionstest/unit/cbus_call.c
Loading
Please register or sign in to comment