#ifndef FRSH_ADAPTION_H_
#define FRSH_ADAPTION_H_
-#include <pthread.h>
-#include <signal.h>
+#include "frsh_fosa_opaque.h"
+
+/**
+ * Public Frsh OS Adaption types
+ **/
+#define FRSH_NULL_SIGNAL FOSA_NULL_SIGNAL
+
+// identifier of a frsh thread
+typedef FOSA_THREAD_ID_T_OPAQUE frsh_thread_id_t;
+
+// thread attributes object
+typedef FOSA_THREAD_ATTR_T_OPAQUE frsh_thread_attr_t;
+
+// signal number; it is an integer type
+typedef FOSA_SIGNAL_T_OPAQUE frsh_signal_t;
+
+// information associated to a signal
+typedef union {int value; void * area; } frsh_signal_info_t;
+
+// frsh mutex
+typedef FOSA_MUTEX_T_OPAQUE frsh_mutex_t;
+
+
+
+
+/*************************
+ * Thread identification
+ *************************/
+
+/**
+ * Compare two thread identifiers to determine if they refer to the
+ * same thread
+ */
+bool fosa_thread_equal(frsh_thread_id_t t1, frsh_thread_id_t t2);
+
+
+/**
+ * Return the thread id of the calling thread
+ */
+frsh_thread_id_t fosa_thread_self();
+
+
+/*************************
+ * Thread creation and termination
+ *************************/
+
+/**
+ * Initialize a thread attributes object
+ *
+ * This function initializes the object pointed to by attr to all
+ * the default values defined by FRSH
+ *
+ * Returns 0 if successful; otherwise it returns
+ * ENOMEM: insufficient memory exists to initialize the thread
+ * attributes object
+ */
+int frsh_thread_attr_init(frsh_thread_attr_t *attr);
+
+/**
+ * Destroy a thread attributes object
+ *
+ * This function is used to destroy the thread attributes object,
+ * pointed to by attr, and deallocate any system resources allocated for it
+ *
+ * Returns 0
+ */
+int frsh_thread_attr_destroy(frsh_thread_attr_t *attr);
+
+/**
+ * Set the thread minimum stack size in a thread attributes object
+ *
+ * This function sets the minimum stack size of the thread attributes
+ * object attr to the value given by stacksize, in bytes. This
+ * function has no runtime effect on the stack size, except when the
+ * attributes object is used to create a thread, when it will be
+ * created with the specified minimum stack size
+ *
+ * Returns 0 if successful, or the following error code:
+ * EINVAL: the specified stacksize value is not supported in
+ * this implementation
+ */
+int frsh_thread_attr_set_stacksize(frsh_thread_attr_t *attr, size_t stacksize);
+
+/**
+ * Get the thread minimum stack size from a thread attributes object
+ *
+ * This function sets the variable pointed to by stacksize to the
+ * minimum stack size stored in the thread attributes object attr.
+ *
+ * Returns 0
+ */
+int frsh_thread_attr_get_stacksize
+ (const frsh_thread_attr_t *attr, size_t *stacksize);
+
+
+
+
typedef pthread_t frsh_thread_id_t;