+/**
+ * \brief Returns the access mode of this workstation.
+ *
+ * \param workstation a workstation
+ * \return the access mode for the tasks running on this workstation:
+ * SD_WORKSTATION_SHARED_ACCESS or SD_WORKSTATION_SEQUENTIAL_ACCESS
+ *
+ * \see SD_workstation_set_access_mode(), e_SD_workstation_access_mode_t
+ */
+e_SD_workstation_access_mode_t
+SD_workstation_get_access_mode(SD_workstation_t workstation)
+{
+ return SD_workstation_priv(workstation)->access_mode;
+}
+
+/**
+ * \brief Sets the access mode for the tasks that will be executed on a workstation
+ *
+ * By default, a workstation model is shared, i.e. several tasks
+ * can be executed at the same time on a workstation. The CPU power of
+ * the workstation is shared between the running tasks on the workstation.
+ * In sequential mode, only one task can use the workstation, and the other
+ * tasks wait in a FIFO.
+ *
+ * \param workstation a workstation
+ * \param access_mode the access mode you want to set to this workstation:
+ * SD_WORKSTATION_SHARED_ACCESS or SD_WORKSTATION_SEQUENTIAL_ACCESS
+ *
+ * \see SD_workstation_get_access_mode(), e_SD_workstation_access_mode_t
+ */
+void SD_workstation_set_access_mode(SD_workstation_t workstation,
+ e_SD_workstation_access_mode_t
+ access_mode)
+{
+ xbt_assert(access_mode != SD_WORKSTATION_SEQUENTIAL_ACCESS ||
+ access_mode != SD_WORKSTATION_SHARED_ACCESS,
+ "Trying to set an invalid access mode");
+
+ if (access_mode == SD_workstation_priv(workstation)->access_mode) {
+ return; // nothing is changed
+ }
+
+ SD_workstation_priv(workstation)->access_mode = access_mode;
+
+ if (access_mode == SD_WORKSTATION_SHARED_ACCESS) {
+ xbt_fifo_free(SD_workstation_priv(workstation)->task_fifo);
+ SD_workstation_priv(workstation)->task_fifo = NULL;
+ } else {
+ SD_workstation_priv(workstation)->task_fifo = xbt_fifo_new();
+ }
+}
+
+/**
+ * \brief Return the list of mounted storages on a workstation.
+ *
+ * \param workstation a workstation
+ * \return a dynar containing all mounted storages on the workstation
+ */
+xbt_dict_t SD_workstation_get_mounted_storage_list(SD_workstation_t workstation){
+ return surf_workstation_get_mounted_storage_list(workstation);
+}
+
+/**
+ * \brief Return the list of mounted storages on a workstation.
+ *
+ * \param workstation a workstation
+ * \return a dynar containing all mounted storages on the workstation
+ */
+xbt_dynar_t SD_workstation_get_attached_storage_list(SD_workstation_t workstation){
+ return surf_workstation_get_attached_storage_list(workstation);
+}
+
+/**
+ * \brief Returns the host name the storage is attached to
+ *
+ * This functions checks whether a storage is a valid pointer or not and return its name.