As with all files, rename the file, adding a preceding l (the letter after k and before m)
This file has a lot of changes. Here's the new one instead#include "lincludes.h" /**************************************************************************** * Function: void InitialiseTasks(void) * * Revision: 6.02 * * Last Update: 08/01/97 * * Allocate memory to the defined task stacks and initialise the TCB * structures for each task. * * Input: None. * * Output: None. * * Return Value: None. ****************************************************************************/ void InitialiseTasks(void) { pthread_attr_t attr; struct sched_param p; int ret; /* Mutex initialization */ pthread_mutex_init (&PROTECT,NULL); /* Normal kind mutex */ /* Thread initialization */ pthread_attr_init (&attr); pthread_attr_setstacksize(&attr,2000); pthread_create (&thTakeMeas, &attr , TTakeMeas, (void *) 1); p.sched_priority = 1; pthread_setschedparam (thTakeMeas, SCHED_FIFO, &p); pthread_attr_setstacksize(&attr,5000); pthread_create (&thNav, &attr, TNav, (void *) 2); ret = pthread_make_periodic_np(thNav, t+2*NSECS_PER_SEC,10*TIC_PERIOD*NSECS_PER_SEC); p . sched_priority = 2; pthread_setschedparam (thNav, SCHED_FIFO, &p); pthread_attr_setstacksize(&attr,9000); pthread_create (&thDisplay, &attr, TDisplay, (void *) 3); ret = pthread_make_periodic_np(thDisplay, t+2*NSECS_PER_SEC,10*TIC_PERIOD*NSECS_PER_SEC); p . sched_priority = 3; pthread_setschedparam (thDisplay, SCHED_FIFO, &p); /* This is the unique non-periodic thread! */ pthread_attr_setstacksize(&attr,2000); pthread_create (&thProcSbf, &attr, TProcSbf, (void *) 4); p . sched_priority = 4; pthread_setschedparam (thProcSbf, SCHED_FIFO, &p); pthread_attr_setstacksize(&attr,9000); pthread_create (&thAlloc, &attr, TAlloc, (void *) 5); ret = pthread_make_periodic_np(thAlloc, t+2*NSECS_PER_SEC,TIC_PERIOD*NSECS_PER_SEC); p . sched_priority = 5; pthread_setschedparam (thAlloc, SCHED_FIFO, &p); } /************************************************************************ * Function: unsigned int interrupt GPISR(unsigned int irq, struct pt_regs *regs) * ************************************************************************/ unsigned int GPISR(unsigned int irq, struct pt_regs *regs) { GPIntCtr++; if(TestingInterface) InterfaceTestInterruptRoutine(); else{ // t = gethrtime(); /* Execute Tracking Loops */ BufferAccumPhase(); /* Control Thread TProcSbf */ //ContrTProcSbf(); } rtl_hard_enable_irq (irq); return 0; }