summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/headers
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-02-13 22:14:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-02-13 22:14:48 +0000
commit94b3ec5970fac914b9f08044b1e31a9d773239d2 (patch)
treeb1295baf63c63d4523b38f8652c13be265a6861c /c/src/exec/score/headers
parentadded clear of _ISR_Signals_to_thread_executing (diff)
downloadrtems-94b3ec5970fac914b9f08044b1e31a9d773239d2.tar.bz2
changed post task extension from user set to api set and added flag
in each thread which must be set when the post switch extension is to be run.
Diffstat (limited to 'c/src/exec/score/headers')
-rw-r--r--c/src/exec/score/headers/apiext.h22
-rw-r--r--c/src/exec/score/headers/thread.h1
-rw-r--r--c/src/exec/score/headers/userext.h20
3 files changed, 20 insertions, 23 deletions
diff --git a/c/src/exec/score/headers/apiext.h b/c/src/exec/score/headers/apiext.h
index 594c71d25c..44e7bc8dd3 100644
--- a/c/src/exec/score/headers/apiext.h
+++ b/c/src/exec/score/headers/apiext.h
@@ -18,6 +18,7 @@
#define __API_EXTENSIONS_h
#include <rtems/score/chain.h>
+#include <rtems/score/thread.h>
/*
* The control structure which defines the points at which an API
@@ -26,11 +27,16 @@
typedef void (*API_extensions_Predriver_hook)(void);
typedef void (*API_extensions_Postdriver_hook)(void);
+typedef void (*API_extensions_Postswitch_hook)(
+ Thread_Control *
+ );
+
typedef struct {
- Chain_Node Node;
- API_extensions_Predriver_hook predriver_hook;
- API_extensions_Postdriver_hook postdriver_hook;
+ Chain_Node Node;
+ API_extensions_Predriver_hook predriver_hook;
+ API_extensions_Postdriver_hook postdriver_hook;
+ API_extensions_Postswitch_hook postswitch_hook;
} API_extensions_Control;
/*
@@ -82,5 +88,15 @@ void _API_extensions_Run_predriver( void );
void _API_extensions_Run_postdriver( void );
+/*
+ * _API_extensions_Run_postswitch
+ *
+ * DESCRIPTION:
+ *
+ * XXX
+ */
+
+void _API_extensions_Run_postswitch( void );
+
#endif
/* end of include file */
diff --git a/c/src/exec/score/headers/thread.h b/c/src/exec/score/headers/thread.h
index d2ffb41093..94909a3a18 100644
--- a/c/src/exec/score/headers/thread.h
+++ b/c/src/exec/score/headers/thread.h
@@ -148,6 +148,7 @@ typedef struct {
MP_packet_Prefix *receive_packet;
/****************** end of common block ********************/
boolean is_global;
+ boolean do_post_task_switch_extension;
Chain_Control *ready;
Priority_Information Priority_map;
Thread_Start_information Start;
diff --git a/c/src/exec/score/headers/userext.h b/c/src/exec/score/headers/userext.h
index 424871e895..58fa087780 100644
--- a/c/src/exec/score/headers/userext.h
+++ b/c/src/exec/score/headers/userext.h
@@ -60,10 +60,6 @@ typedef User_extensions_routine ( *User_extensions_thread_switch_extension )(
Thread_Control *
);
-typedef User_extensions_routine (*User_extensions_thread_post_switch_extension)(
- Thread_Control *
- );
-
typedef User_extensions_routine ( *User_extensions_thread_begin_extension )(
Thread_Control *
);
@@ -85,7 +81,6 @@ typedef struct {
User_extensions_thread_restart_extension thread_restart;
User_extensions_thread_delete_extension thread_delete;
User_extensions_thread_switch_extension thread_switch;
- User_extensions_thread_post_switch_extension thread_post_switch;
User_extensions_thread_begin_extension thread_begin;
User_extensions_thread_exitted_extension thread_exitted;
User_extensions_fatal_extension fatal;
@@ -230,21 +225,6 @@ STATIC INLINE void _User_extensions_Thread_switch (
);
/*
- * _User_extensions_Thread_post_switch
- *
- * DESCRIPTION:
- *
- * This routine is used to invoke the user extension which is invoked
- * after a context switch occurs (i.e. we are running in the context
- * of the new thread).
- */
-
-STATIC INLINE void _User_extensions_Thread_post_switch (
- Thread_Control *executing
-);
-
-
-/*
* _User_extensions_Thread_begin
*
* DESCRIPTION: