]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_shared_objects.h
Added Makefiles for OMK makesystem
[frescor/frsh-include.git] / frsh_shared_objects.h
index 5e9e1683c00fb5cff25772c712e37d1bb5ef2d76..76e0d893e4af6dbef2e897f6214aa3e1146f9ce1 100644 (file)
 #ifndef _FRSH_SHARED_OBJECTS_H_
 #define _FRSH_SHARED_OBJECTS_H_
 
-#include "frsh_fosa.h"
 #include "frsh_shared_objects_types.h"
 #include "frsh_core_types.h"
 
+FRSH_CPP_BEGIN_DECLS
 
 #define FRSH_SHAREDOBJS_MODULE_SUPPORTED       1
 
@@ -375,7 +375,7 @@ int frsh_sharedobj_remove
  **/
 int frsh_csect_init
     (frsh_sharedobj_handle_t obj_handle,
-     struct timespec wcet,
+     frsh_rel_time_t wcet,
      frsh_csect_t *csect);
 
 
@@ -419,7 +419,7 @@ int frsh_csect_get_sharedobj_handle
  **/
 int frsh_csect_get_wcet
     (const frsh_csect_t *csect,
-     struct timespec *wcet);
+     frsh_rel_time_t *wcet);
 
 
 /**
@@ -618,7 +618,35 @@ int frsh_csect_invoke
  **/
 int frsh_csect_get_blocking_time
     (const frsh_csect_t *csect,
-     struct timespec *blocking);
+     frsh_rel_time_t *blocking);
+
+
+/**
+ * frsh_csect_destroy()
+ * 
+ * Destroy a critical section, deallocating all the resources that may
+ * have been allocated to it.
+ **/
+int frsh_csect_destroy
+   (frsh_csect_t *csect);
+
+/**
+ * frsh_csect_register_thread()
+ * 
+ * Register the calling thread for invoking time-protected critical
+ * sections via frsh_csect_invoke.
+ **/
+int frsh_csect_register_thread();
+
+/**
+ * frsh_csect_deregister_thread()
+ * 
+ * Deregister the calling thread from being able to invoke
+ * time-protected critical sections. This operation releases system
+ * resources that may have been allocated for the thread.
+ **/
+int frsh_csect_deregister_thread();
+
 
 
 /*@}*/ /* For so_critical group */
@@ -675,4 +703,6 @@ int frsh_contract_get_csects
 
 /*@}*/ /* For shared_objects group */
 
+FRSH_CPP_END_DECLS
+
 #endif // _FRSH_SHARED_OBJECTS_H_