Пример #1
0
/* main */ 
int main(void)
{
    /* initialise kernel */ 
    si_kernel_init(); 
    
    /* initialise UI channel */ 
    si_ui_init(); 

    /* initialise display */
    display_init();

    /* initialise variables */         
    clock_init(); 

    /* create tasks */ 

    si_task_create(clock_task, &Clock_Stack[STACK_SIZE-1], 20); 

    si_task_create(alarm_task, &Alarm_Stack[STACK_SIZE-1],17);

    si_task_create(set_task, &Set_Stack[STACK_SIZE-1], 15);
 

    /* start the kernel */ 
    si_kernel_start(); 

    /* will never be here! */ 
    return 0; 
}
Пример #2
0
int main(void)
{
    /* initialise kernel */ 
    si_kernel_init(); 
	
	/* initialise message handling */ 
    si_message_init(); 
	
	/* set up random number generator */
	srand(12345);
    
    /* initialise UI channel */ 
    si_ui_init(); 

    /* set size of GUI window */ 
    si_ui_set_size(670, 700); 

    /* initialise variables */         
    mainlift=lift_create();

    /* create tasks */ 

    si_task_create(lift_task, &Lift_Stack[STACK_SIZE-1], 20); 

    si_task_create(user_task, &User_Stack[STACK_SIZE-1], 15);
 
    /* start the kernel */ 
    si_kernel_start(); 

    /* will never be here! */ 
    return 0; 
}
Пример #3
0
int main(void)
{
    /* initialise kernel */ 
    si_kernel_init(); 
    
    /* initialise UI channel */ 
    si_ui_init(); 

    /* initialise semaphore */ 
    si_sem_init(&Mutex, 1); 

    /* create tasks */ 

    si_task_create(display_task, &Display_Stack[STACK_SIZE - 1], 10);

    si_task_create(change_task, &Change_Stack[STACK_SIZE - 1], 20);

    si_task_create(exit_task, &Exit_Stack[STACK_SIZE - 1], 15);

    /* start the kernel */ 
    si_kernel_start(); 

    /* will never be here! */ 
    return 0; 
}
Пример #4
0
int main(void)
{
    /* initialise kernel */ 
    si_kernel_init(); 
	
	/* initialise message handling */ 
    si_message_init(); 
	
	/* set up random number generator */
	srand(12345);
    
    /* initialise UI channel */ 
    si_ui_init(); 

    /* set size of GUI window */ 
    si_ui_set_size(670, 700); 

    /* initialise variables */         
    lift_init(mainlift);

    /* create tasks */ 

    /* create tasks */ 

    si_task_create(
        lift_task, &Lift_Stack[STACK_SIZE - 1], LIFT_PRIORITY);

    Lift_Task_Id = 1; 

    si_task_create(
        move_lift_task, &Move_Lift_Stack[STACK_SIZE - 1], MOVE_LIFT_PRIORITY);

    Move_Lift_Task_Id = 2; 

    si_task_create(
        user_task, &User_Stack[STACK_SIZE - 1], USER_PRIORITY);

    User_Task_Id = 3; 

    Lowest_Passenger_Task_Id = TASK_ID_FIRST_PERSON;
 
    /* start the kernel */ 
    si_kernel_start(); 

    /* will never be here! */ 
    return 0; 
}
Пример #5
0
/* main function */ 
int main(void)
{
    /* initialise kernel */ 
    si_kernel_init(); 

    /* initialise message handling */ 
    si_message_init(); 

    init_task_stop(); 

    /* create tasks */
    si_task_create(task_creator_task,
       &Task_Creator_Stack[STACK_SIZE-1], TIME_SHARED_PRIORITY_BASE-2);
    si_task_create(real_time_task,
       &Real_Time_Stack[STACK_SIZE-1], TIME_SHARED_PRIORITY_BASE-1);
   
    /* start the kernel */ 
    si_kernel_start(); 

    /* will never be here! */ 
    return 0; 
}