add gettimeofday by physical buffer. used by futex()

This commit is contained in:
NAKAMURA Gou
2013-06-17 17:40:03 +09:00
parent 3d11115491
commit 329dd42c32
2 changed files with 5 additions and 3 deletions

View File

@ -590,14 +590,16 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock)
break;
case __NR_gettimeofday:
case __NR_futex:
ret = gettimeofday((struct timeval *)dma_buf, NULL);
SET_ERR(ret);
__dprintf("gettimeofday=%016ld,%09ld\n", ((struct timeval *)dma_buf)->tv_sec, ((struct timeval *)dma_buf)->tv_usec);
__dprintf("gettimeofday=%016ld,%09ld\n",
((struct timeval *)dma_buf)->tv_sec,
((struct timeval *)dma_buf)->tv_usec);
do_syscall_return(fd, cpu, ret, 1, (unsigned long)dma_buf,
w.sr.args[0], sizeof(struct timeval));
break;
case __NR_clone:
__dprintf("MIC clone(), new thread's cpu_id: %ld\n", w.sr.args[0]);

View File

@ -654,7 +654,7 @@ SYSCALL_DECLARE(futex)
if (utime && (op == FUTEX_WAIT_BITSET || op == FUTEX_WAIT)) {
struct syscall_request request IHK_DMA_ALIGN;
struct timeval tv_now;
request.number = 96;
request.number = n;
unsigned long __phys;
dkprintf("futex,utime and FUTEX_WAIT_*, uaddr=%lx, []=%x\n", (unsigned long)uaddr, *uaddr);