else
XBT_INFO(" no task running");
break;
- default:
- XBT_INFO(" - (unknown access mode)");
+ default: break;
}
props = SD_workstation_get_properties(ws);
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 == workstation->access_mode) {
return; // nothing is changed
}
}
}
-/* Returns whether a task can start now on a workstation.
- *//*
- int __SD_workstation_can_start(SD_workstation_t workstation, SD_task_t task) {
- SD_CHECK_INIT_DONE();
- xbt_assert(workstation != NULL && task != NULL, "Invalid parameter");
+/* Returns whether a task can start now on a workstation*/
+/*
+ int __SD_workstation_can_start(SD_workstation_t workstation, SD_task_t task) {
+ SD_CHECK_INIT_DONE();
+ xbt_assert(workstation != NULL && task != NULL, "Invalid parameter");
- return !__SD_workstation_is_busy(workstation) &&
- (xbt_fifo_size(workstation->task_fifo) == 0) || xbt_fifo_get_first_item(workstation->task_fifo) == task);
- }
- */
+ return !__SD_workstation_is_busy(workstation) &&
+ (xbt_fifo_size(workstation->task_fifo) == 0) || xbt_fifo_get_first_item(workstation->task_fifo) == task);
+ }
+*/
/* Returns whether a workstation is busy. A workstation is busy is it is
* in sequential mode and a task is running on it or the fifo is not empty.