flag used for actor stopping insetad of counter

This commit is contained in:
2026-02-17 17:59:12 -06:00
parent 5ee51198a7
commit b16fa75706
10 changed files with 115 additions and 109 deletions

View File

@@ -1,5 +1,6 @@
#include <pthread.h>
#include <stdatomic.h>
/* Letter type for unified message queue */
typedef enum {
@@ -67,8 +68,7 @@ typedef struct cell_rt {
int affinity;
uint64_t turn_start_ns; // cell_ns() when turn began
uint64_t turn_deadline_ns; // turn_start_ns + fast or slow timer
int is_slow_turn; // 1 if running under slow timer
_Atomic uint32_t turn_gen; // incremented each turn start
int slow_strikes; // consecutive slow-completed turns
int vm_suspended; // 1 if VM is paused mid-turn
@@ -93,7 +93,6 @@ void actor_clock(cell_rt *actor, JSValue fn);
uint32_t actor_delay(cell_rt *actor, JSValue fn, double seconds);
JSValue actor_remove_timer(cell_rt *actor, uint32_t timer_id);
void exit_handler(void);
int actor_interrupt_cb(JSRuntime *rt, cell_rt *crt);
void actor_loop();
void actor_initialize(void);
void actor_free(cell_rt *actor);