* bufspace_daemon_wakeup: * * Wakeup the daemons responsible for freeing clean bufs. */
| 613 | * Wakeup the daemons responsible for freeing clean bufs. |
| 614 | */ |
| 615 | static void |
| 616 | bufspace_daemon_wakeup(struct bufdomain *bd) |
| 617 | { |
| 618 | |
| 619 | /* |
| 620 | * avoid the lock if the daemon is running. |
| 621 | */ |
| 622 | if (atomic_fetchadd_int(&bd->bd_running, 1) == 0) { |
| 623 | BD_RUN_LOCK(bd); |
| 624 | atomic_store_int(&bd->bd_running, 1); |
| 625 | wakeup(&bd->bd_running); |
| 626 | BD_RUN_UNLOCK(bd); |
| 627 | } |
| 628 | } |
| 629 | |
| 630 | /* |
| 631 | * bufspace_daemon_wait: |
no test coverage detected