takemeas.c

As with all files, rename the file, adding a preceding l (the letter after k and before m)

line# action
1 replace #include "includes.h" with #include "lincludes.h"
26 insert/****************************************************************************
* Function: void ContrTTakeMeas(void)
*
* Last Update 07/06/00
*
* controls TTakeMeas Operation
*
****************************************************************************/
void ContrTTakeMeas(void)
{
if (EXECUTIC>0 && sbfc)
{
pthread_wakeup_np(thTakeMeas);
EXECUTIC = 0;
}
}
42 replace void TTakeMeas(void) with void *TTakeMeas(void *arg)
49 insert rtl_irqstate_t state;
49 insert pthread_setfp_np (pthread_self(), 1);
49 insert sbfc = TRUE;
52 insert pthread_suspend_np(pthread_self()); before CurrentTIC(&start_tic);
63 insert meas_status_a = inpf(MEAS_STATUS_A); with meas_status_a = inw_p(TR(MEAS_STATUS_A));
88 replace PROTECT++; with rec_mutex_lock ((int)arg);
92 replace PROTECT--; with rec_mutex_unlock ((int)arg);
114 replace TICToGpsTime(TIC,&g); with TICToGpsTime(TIC,&g, (int)arg);
141 replace chanptr->codeph = inpw(chanptr->_CTRL_BASE + CODE_PHASE); with chanptr->codeph = inw_p(TR((chanptr->_CTRL_BASE + CODE_PHASE)>>ADDRESS_SHIFT));
143 replace chanptr->codeph += inpw(chanptr->_CTRL_BASE + CODE_DCO_PHASE); with chanptr->codeph += inw_p(TR((chanptr->_CTRL_BASE + CODE_DCO_PHASE)>>ADDRESS_SHIFT));
193 replace PROTECT++; with rec_mutex_lock ((int)arg);
196 replace PROTECT--; with rec_mutex_unlock ((int)arg);
237 replace disable(); with rtl_no_interrupts(state);
259 remove enable(); with rtl_restore_interrupts(state);
307 replace epoch_count = inpw(chanptr->_CTRL_BASE + EPOCH); with epoch_count = inw_p(TR((chanptr->_CTRL_BASE + EPOCH)>>ADDRESS_SHIFT));
338 replace PROTECT++; with rec_mutex_lock ((int)arg);
340 replace PROTECT--; with rec_mutex_unlock ((int)arg);
344 replace PredictedData(g.sec,chanptr->SV-1,&N,&P); with PredictedData(g.sec,chanptr->SV-1,&N,&P,(int)arg);
463 replace PROTECT++; with rec_mutex_lock ((int)arg);
465 replace PROTECT--; with rec_mutex_unlock ((int)arg);
469 replace PredictedData(g.sec,chanptr->SV-1,&N,&P); with PredictedData(g.sec,chanptr->SV-1,&N,&P,(int)arg);
515 remove outpw(chanptr->_ACCUM_BASE + CODE_SLEW_COUNTER, slew_chips); with outw_p(slew_chips,TR((chanptr->_ACCUM_BASE + CODE_SLEW_COUNTER)>>ADDRESS_SHIFT));
657 remove Suspend(1,start_tic);