Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 953 → Rev 954

/shark/trunk/ports/first/first-sync.c
178,7 → 178,7
if (proc_table[exec_shadow].task_level != local_scheduler_level) return 0;
 
switch (scheduler_id) {
case FSF_POSIX:
case FSF_RR:
budget = POSIXSTAR_getbudget(local_scheduler_level, exec_shadow);
break;
case FSF_EDF:
187,7 → 187,7
case FSF_NONE:
budget = NONESTAR_getbudget(local_scheduler_level, exec_shadow);
break;
case FSF_RM:
case FSF_FP:
budget = RMSTAR_getbudget(local_scheduler_level, exec_shadow);
break;
 
268,13 → 268,13
}
switch (scheduler_id) {
case FSF_POSIX:
case FSF_RR:
budget = POSIXSTAR_getbudget(local_scheduler_level, exec_shadow);
break;
case FSF_EDF:
budget = EDFSTAR_getbudget(local_scheduler_level, exec_shadow);
break;
case FSF_RM:
case FSF_FP:
budget = RMSTAR_getbudget(local_scheduler_level, exec_shadow);
case FSF_NONE:
budget = NONESTAR_getbudget(local_scheduler_level, exec_shadow);
363,13 → 363,13
}
switch (scheduler_id) {
case FSF_POSIX:
case FSF_RR:
budget = POSIXSTAR_getbudget(local_scheduler_level, exec_shadow);
break;
case FSF_EDF:
budget = EDFSTAR_getbudget(local_scheduler_level, exec_shadow);
break;
case FSF_RM:
case FSF_FP:
budget = RMSTAR_getbudget(local_scheduler_level, exec_shadow);
default:
budget = -1;
/shark/trunk/ports/first/first-contract.c
470,3 → 470,114
return 0;
}
*/
 
// MARTE IMPLEMENTATION SPECIFIC MODULE
 
// The operations defined in this module are of optional use. They
// only work in the fixed priority implementation, and they may be
// used to enhance the behavior of the applications running under the
// fsf scheduler.
 
//// The definition of this type is in fsf_basic_types.h
//
//typedef unsigned long fsf_preemption_level_t;
// // range 1..2**32-1
 
 
//fsf_set_contract_preemption_level: The operation updates the
//specified contract parameters object by setting its preemption level
//to the specified input parameter.
 
int
fsf_set_contract_preemption_level
(fsf_contract_parameters_t *contract,
fsf_preemption_level_t preemption_level) {
return 0;
}
 
 
//fsf_get_contract_preemption_level: The operation obtains from the
//specified contract parameters object its preemption level and copies
//it to the place pointed to by the specified input parameter.
 
int
fsf_get_contract_preemption_level
(const fsf_contract_parameters_t *contract,
fsf_preemption_level_t *preemption_level) {
return 0;
}
 
 
 
//fsf_set_service_thread_preemption_level: this function sets the
//preemption level of the service thread to the specified value. The
//initial preemption level is a configurable parameter
 
int
fsf_set_service_thread_preemption_level
(fsf_preemption_level_t preemption_level) {
return 0;
}
 
 
//fsf_get_service_thread_preemption_level: this function stores the
//current preemption level of the service thread in the variable
//pointed to by preemption_level
 
int
fsf_get_service_thread_preemption_level
(fsf_preemption_level_t *preemption_level) {
return 0;
}
 
 
 
//fsf_thread_exit: There is a limitation in the current version of the
//MaRTE implementation that causes the information of a terminated
//thread to continue to be stored in the fsf scheduler, and the thread
//to continue to be counted in the number of threads. The
//fsf_thread_exit operation allows the implementation to delete the
//thread's information, and then terminate the thread. Therefore, it
//is recommended to use this function to terminate a thread under fsf.
 
//This operation shall terminate the calling thread, make the value
//value_ptr available to any successful join with the terminating
//thread, and unbind the thread from its associated server. After
//cleaning up the thread management data, it is unbound and the
//scheduling policy is changed to fixed priority before the posix
//pthread_exit() function is called.
 
void
fsf_thread_exit (void *value_ptr) {
return;
}
 
 
 
//fsf_set_shared_obj_preemption_level: The operation updates the
//specified shared object by setting its preemption level
//to the specified input parameter.
//OBSERVATION: if this value is changed being any contract that
//uses the resource already accepted, the system's behavior and
//particularly the acceptance tests correctness are not garantee
//and probably wrong.
 
int
fsf_set_shared_obj_preemption_level
(fsf_shared_obj_handle_t obj_handle,
fsf_preemption_level_t preemption_level) {
return 0;
}
 
 
 
//fsf_get_shared_obj_preemption_level: The operation obtains from the
//specified shared object its preemption level and copies
//it to the place pointed to by the specified input parameter.
 
int
fsf_get_shared_obj_preemption_level
(fsf_shared_obj_handle_t obj_handle,
fsf_preemption_level_t *preemption_level) {
return 0;
}