machinarium: update csw benchmark

This commit is contained in:
Dmitry Simonenko 2017-05-18 13:20:58 +03:00
parent 6b536d8647
commit 94b0ce6b30
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ static void
benchmark_runner(void *arg) benchmark_runner(void *arg)
{ {
printf("benchmark started.\n"); printf("benchmark started.\n");
machine_create_fiber(benchmark_worker, NULL); machine_fiber_create(benchmark_worker, NULL);
machine_sleep(1000); machine_sleep(1000);
printf("done.\n"); printf("done.\n");
printf("context switches %d in 1 sec.\n", csw); printf("context switches %d in 1 sec.\n", csw);
@ -41,7 +41,7 @@ main(int argc, char *argv[])
{ {
machinarium_init(); machinarium_init();
int id = machine_create("benchmark", benchmark_runner, NULL); int id = machine_create("benchmark", benchmark_runner, NULL);
machine_join(id); machine_wait(id);
machinarium_free(); machinarium_free();
return 0; return 0;
} }