diff options
| author | Tyge Løvset <[email protected]> | 2023-08-08 12:28:15 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-08-08 15:57:25 +0200 |
| commit | c27c266b6c4ae0e5e535b18c3790ee97416412b9 (patch) | |
| tree | 0b73c9cf644486abbc9213f98c1c308b7511c7dc /misc/examples/coroutines/dining_philosophers.c | |
| parent | 9e13d34c82abfeeadcc8697331f9fd3e5e7f2bca (diff) | |
| download | STC-modified-c27c266b6c4ae0e5e535b18c3790ee97416412b9.tar.gz STC-modified-c27c266b6c4ae0e5e535b18c3790ee97416412b9.zip | |
Reverted cco_cleanup => cco_final. (cco_cleanup deprecated).
Updated generator.c example. Misc internal refactoring.
Diffstat (limited to 'misc/examples/coroutines/dining_philosophers.c')
| -rw-r--r-- | misc/examples/coroutines/dining_philosophers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/examples/coroutines/dining_philosophers.c b/misc/examples/coroutines/dining_philosophers.c index e917c303..d353b3b9 100644 --- a/misc/examples/coroutines/dining_philosophers.c +++ b/misc/examples/coroutines/dining_philosophers.c @@ -48,7 +48,7 @@ int philosopher(struct Philosopher* p) cco_sem_release(p->right_fork); } - cco_cleanup: + cco_final: printf("Philosopher %d finished\n", p->id); } return 0; @@ -76,7 +76,7 @@ int dining(struct Dining* d) cco_yield(); // suspend, return control back to main } - cco_cleanup: + cco_final: for (int i = 0; i < num_philosophers; ++i) { cco_stop(&d->ph[i]); philosopher(&d->ph[i]); |
