uti: futex call function in mcctrl
Previously, futex code of McKerenl was called by mccontrol, but there ware some problems with this method. (Mainly, location of McKernel image on memory) Call futex code in mcctrl instead of the one in McKernel image, giving the following benefits: 1. Not relying on shared kernel virtual address space with Linux any more 2. The cpu id store / retrieve is not needed and resulting in the code Change-Id: Ic40929b64a655b270c435859fa287fedb713ee5c refe: #1428
This commit is contained in:
committed by
Masamichi Takagi
parent
35296c8210
commit
a9973e913d
@ -102,25 +102,6 @@ double nspw; /* nsec per work */
|
||||
|
||||
#define N_INIT 10000000
|
||||
|
||||
void fwq_init() {
|
||||
struct timespec start, end;
|
||||
unsigned long nsec;
|
||||
int i;
|
||||
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start);
|
||||
bulk_fsw(N_INIT);
|
||||
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end);
|
||||
nsec = (TS2NS(end.tv_sec, end.tv_nsec) - TS2NS(start.tv_sec, start.tv_nsec));
|
||||
nspw = nsec / (double)N_INIT;
|
||||
printf("nsec=%ld, nspw=%f\n", nsec, nspw);
|
||||
}
|
||||
|
||||
void fwq(long delay_nsec) {
|
||||
if (delay_nsec < 0) {
|
||||
printf("%s: delay_nsec<0\n", __FUNCTION__);
|
||||
}
|
||||
//printf("delay_nsec=%ld,count=%f\n", delay_nsec, delay_nsec / nspw);
|
||||
bulk_fsw(delay_nsec / nspw);
|
||||
}
|
||||
int progress_responder(struct thr_arg *thr_arg) {
|
||||
int ret = 0;
|
||||
int j;
|
||||
|
||||
Reference in New Issue
Block a user