* vm_page_busy_downgrade: * * Downgrade an exclusive busy page into a single shared busy page. */
| 910 | * Downgrade an exclusive busy page into a single shared busy page. |
| 911 | */ |
| 912 | void |
| 913 | vm_page_busy_downgrade(vm_page_t m) |
| 914 | { |
| 915 | u_int x; |
| 916 | |
| 917 | vm_page_assert_xbusied(m); |
| 918 | |
| 919 | x = vm_page_busy_fetch(m); |
| 920 | for (;;) { |
| 921 | if (atomic_fcmpset_rel_int(&m->busy_lock, |
| 922 | &x, VPB_SHARERS_WORD(1))) |
| 923 | break; |
| 924 | } |
| 925 | if ((x & VPB_BIT_WAITERS) != 0) |
| 926 | wakeup(m); |
| 927 | } |
| 928 | |
| 929 | /* |
| 930 | * |
no test coverage detected