added experimental code that implements singal callback in semaphore

This commit is contained in:
hyunghwan.chung
2017-10-05 17:14:38 +00:00
parent a54c2e21f2
commit 1fd9ce285c
5 changed files with 65 additions and 41 deletions

View File

@ -4243,8 +4243,8 @@ static pf_t pftab[] =
{ "Process__terminate", { pf_process_terminate, 0, 0 } },
{ "Semaphore_signal", { pf_semaphore_signal, 0, 0 } },
{ "Semaphore_wait", { pf_semaphore_wait, 0, 0 } },
{ "SemaphoreGroup_wait", { pf_semaphore_group_wait, 0, 0 } },
{ "Semaphore__wait", { pf_semaphore_wait, 0, 0 } },
{ "SemaphoreGroup__wait", { pf_semaphore_group_wait, 0, 0 } },
{ "SmallInteger_asCharacter", { pf_smooi_as_character, 0, 0 } },
{ "SmallInteger_asError", { pf_smooi_as_error, 0, 0 } },

View File

@ -748,7 +748,7 @@ struct moo_context_t
typedef struct moo_process_t moo_process_t;
typedef struct moo_process_t* moo_oop_process_t;
#define MOO_SEMAPHORE_NAMED_INSTVARS 10
#define MOO_SEMAPHORE_NAMED_INSTVARS 11
typedef struct moo_semaphore_t moo_semaphore_t;
typedef struct moo_semaphore_t* moo_oop_semaphore_t;
@ -814,6 +814,7 @@ struct moo_semaphore_t
moo_oop_t io_handle;
moo_oop_t io_mask; /* SmallInteger */
moo_oop_t signal_action;
moo_oop_semaphore_group_t group; /* nil or belonging semaphore group */
};