Skip to content

Commit 8e988dd

Browse files
author
Janusz Augustyński
committed
Poprawki
1 parent e97c230 commit 8e988dd

2 files changed

Lines changed: 8 additions & 14 deletions

File tree

module/base/0.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ extern void E_flow_Q_process_call_I_func(P);
3030
#define _sigprocmask(how,set,oldset) { V0_( sigprocmask( (how), (set), (oldset) )); }
3131
#endif
3232
#ifdef C_pthreads
33-
#define _Z_tasks_table_S_edit_begin Vr_( pthread_mutex_lock( &E_base_S->E_flow_Z_task_table_S_mutex )); _sigprocmask( SIG_BLOCK, &E_base_S->E_flow_Z_sigset_S_process_call_reply, &E_base_S->E_flow_Z_task_table_S_sigset ); U_L( E_base_S->E_flow_S_mode, Z_task_table_S_can_read ); E_base_S->E_flow_Q_task_S_tmp.touched_stack = task_current->touched_stack
33+
#define _Z_tasks_table_S_edit_begin_first Vr_( pthread_mutex_lock( &E_base_S->E_flow_Z_task_table_S_mutex )); _sigprocmask( SIG_BLOCK, &E_base_S->E_flow_Z_sigset_S_process_call_reply, &E_base_S->E_flow_Z_task_table_S_sigset ); struct E_flow_Q_task_Z *task_current = E_mem_Q_tab_R( E_base_S->E_flow_Q_task_S, E_base_S->E_flow_Q_task_S_current ); E_base_S->E_flow_Q_task_S_tmp.stack = task_current->stack; E_base_S->E_flow_Q_task_S_tmp.touched_stack = task_current->touched_stack; U_L( E_base_S->E_flow_S_mode, Z_task_table_S_can_read )
34+
#define _Z_tasks_table_S_edit_begin Vr_( pthread_mutex_lock( &E_base_S->E_flow_Z_task_table_S_mutex )); _sigprocmask( SIG_BLOCK, &E_base_S->E_flow_Z_sigset_S_process_call_reply, &E_base_S->E_flow_Z_task_table_S_sigset ); E_base_S->E_flow_Q_task_S_tmp.touched_stack = task_current->touched_stack; U_L( E_base_S->E_flow_S_mode, Z_task_table_S_can_read )
3435
#define _Z_tasks_table_S_edit_end task_current->touched_stack = E_base_S->E_flow_Q_task_S_tmp.touched_stack; U_F( E_base_S->E_flow_S_mode, Z_task_table_S_can_read ); _sigprocmask( SIG_SETMASK, &E_base_S->E_flow_Z_task_table_S_sigset, 0 ); Vr_( pthread_mutex_unlock( &E_base_S->E_flow_Z_task_table_S_mutex ))
3536
#else
36-
#define _Z_tasks_table_S_edit_begin _sigprocmask( SIG_BLOCK, &E_base_S->E_flow_Z_sigset_S_process_call_reply, &E_base_S->E_flow_Z_task_table_S_sigset ); U_L( E_base_S->E_flow_S_mode, Z_task_table_S_can_read ); E_base_S->E_flow_Q_task_S_tmp.touched_stack = task_current->touched_stack
37+
#define _Z_tasks_table_S_edit_begin_first _sigprocmask( SIG_BLOCK, &E_base_S->E_flow_Z_sigset_S_process_call_reply, &E_base_S->E_flow_Z_task_table_S_sigset ); struct E_flow_Q_task_Z *task_current = E_mem_Q_tab_R( E_base_S->E_flow_Q_task_S, E_base_S->E_flow_Q_task_S_current ); E_base_S->E_flow_Q_task_S_tmp.stack = task_current->stack; E_base_S->E_flow_Q_task_S_tmp.touched_stack = task_current->touched_stack; U_L( E_base_S->E_flow_S_mode, Z_task_table_S_can_read )
38+
#define _Z_tasks_table_S_edit_begin _sigprocmask( SIG_BLOCK, &E_base_S->E_flow_Z_sigset_S_process_call_reply, &E_base_S->E_flow_Z_task_table_S_sigset ); E_base_S->E_flow_Q_task_S_tmp.touched_stack = task_current->touched_stack; U_L( E_base_S->E_flow_S_mode, Z_task_table_S_can_read )
3739
#define _Z_tasks_table_S_edit_end task_current->touched_stack = E_base_S->E_flow_Q_task_S_tmp.touched_stack; U_F( E_base_S->E_flow_S_mode, Z_task_table_S_can_read ); _sigprocmask( SIG_SETMASK, &E_base_S->E_flow_Z_task_table_S_sigset, 0 )
3840
#endif
3941
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

module/base/flow-drv.cx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,7 @@ E_flow_Q_task_M( I *uid
314314
#ifdef E_mem_Q_blk_C_debug
315315
E_mem_Q_blk_P_fill_c( touched_stack, touched_size, 0xa5 ); //TODO Procedura usuwająca zerowanie nowej pamięci na czas usuwania zmiennych globalnych i testów.
316316
#endif
317-
struct E_flow_Q_task_Z *task_current = E_mem_Q_tab_R( E_base_S->E_flow_Q_task_S, E_base_S->E_flow_Q_task_S_current );
318-
_Z_tasks_table_S_edit_begin;
319-
E_base_S->E_flow_Q_task_S_tmp.stack = task_current->stack;
317+
_Z_tasks_table_S_edit_begin_first;
320318
I task_id = E_mem_Q_tab_I_add( E_base_S->E_flow_Q_task_S );
321319
struct E_flow_Q_task_Z *task = E_mem_Q_tab_R( E_base_S->E_flow_Q_task_S, task_id );
322320
task->stack = stack;
@@ -711,9 +709,7 @@ E_flow_Q_task_W( I *uid
711709
{ E_flow_Q_task_I_switch(id); // Przełącz tylko po to, by ‹zadanie› zwalniane zwolniło zasoby; również stosowo, hierarchicznie z powrotem przełączając przy zwalnianiu ‹zadań› przez siebie uruchomionych.
712710
task = E_mem_Q_tab_R( E_base_S->E_flow_Q_task_S, id );
713711
}
714-
struct E_flow_Q_task_Z *task_current = E_mem_Q_tab_R( E_base_S->E_flow_Q_task_S, E_base_S->E_flow_Q_task_S_current );
715-
_Z_tasks_table_S_edit_begin;
716-
E_base_S->E_flow_Q_task_S_tmp.stack = task_current->stack;
712+
_Z_tasks_table_S_edit_begin_first;
717713
V0_( munmap( task->stack, task->stack_size ));
718714
E_mem_Q_tab_I_remove( E_base_S->E_flow_Q_task_S, id );
719715
_Z_tasks_table_S_edit_end;
@@ -889,9 +885,7 @@ E_flow_Q_task_async_M( I *uid
889885
#ifdef E_mem_Q_blk_C_debug
890886
E_mem_Q_blk_P_fill_c( touched_stack, pthread_stack_min, 0xa5 ); //TODO Procedura usuwająca zerowanie nowej pamięci na czas usuwania zmiennych globalnych i testów.
891887
#endif
892-
struct E_flow_Q_task_Z *task_current = E_mem_Q_tab_R( E_base_S->E_flow_Q_task_S, E_base_S->E_flow_Q_task_S_current );
893-
_Z_tasks_table_S_edit_begin;
894-
E_base_S->E_flow_Q_task_S_tmp.stack = task_current->stack;
888+
_Z_tasks_table_S_edit_begin_first;
895889
I task_id = E_mem_Q_tab_I_add( E_base_S->E_flow_Q_task_S );
896890
struct E_flow_Q_task_Z *task = E_mem_Q_tab_R( E_base_S->E_flow_Q_task_S, task_id );
897891
task->stack = stack;
@@ -1224,9 +1218,7 @@ E_flow_Q_task_async_W( I *uid
12241218
W( task->thread_switch );
12251219
W( task->thread_switch_out );
12261220
W( task->thread_switch_in );
1227-
struct E_flow_Q_task_Z *task_current = E_mem_Q_tab_R( E_base_S->E_flow_Q_task_S, E_base_S->E_flow_Q_task_S_current );
1228-
_Z_tasks_table_S_edit_begin;
1229-
E_base_S->E_flow_Q_task_S_tmp.stack = task_current->stack;
1221+
_Z_tasks_table_S_edit_begin_first;
12301222
V0_( munmap( task->stack, task->stack_size ));
12311223
E_mem_Q_tab_I_remove( E_base_S->E_flow_Q_task_S, id );
12321224
_Z_tasks_table_S_edit_end;

0 commit comments

Comments
 (0)