Realized yielding is actually faster by a lot

This commit is contained in:
Sparchatus 2022-05-09 07:42:27 +00:00
parent 4dbaf216b3
commit 8642c075ea

View File

@ -56,7 +56,7 @@ errval_t do_aos_urpc(
// wait until the rpc call completes // wait until the rpc call completes
while(rpc->meta->call_in_progress) { while(rpc->meta->call_in_progress) {
// yield the thread because there might be useful stuff to do... // yield the thread because there might be useful stuff to do...
// thread_yield(); thread_yield();
} }
// memory barrier // memory barrier
@ -180,9 +180,8 @@ int urpc_server(void *arg) {
while (true) { while (true) {
// wait until an rpc call arrives // wait until an rpc call arrives
while(urpc->meta->call_in_progress == false) { while(urpc->meta->call_in_progress == false) {
// sleep for a bit while there is nothing to do // yield the thread because there might be useful stuff to do...
// barrelfish_usleep(100); thread_yield();
// thread_yield();
} }
// memory barrier // memory barrier