freebsd32_misc.c (34eda6348d633dd3c514112c29aee7b9928b435c) freebsd32_misc.c (996a568eda9ff05591e32e9b9d06dd30724c94e7)
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 461 unchanged lines hidden (view full) ---

470 TV_CP(s, s32, it_interval);
471 TV_CP(s, s32, it_value);
472 error = copyout(&s32, op32, sizeof(s32));
473 }
474 return (error);
475}
476
477int
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 461 unchanged lines hidden (view full) ---

470 TV_CP(s, s32, it_interval);
471 TV_CP(s, s32, it_value);
472 error = copyout(&s32, op32, sizeof(s32));
473 }
474 return (error);
475}
476
477int
478freebsd32_getitimer(struct thread *td, struct freebsd32_getitimer_args *uap)
479{
480 int error;
481 caddr_t sg;
482 struct itimerval32 *p32, s32;
483 struct itimerval *p = NULL, s;
484
485 p32 = uap->itv;
486 if (p32) {
487 sg = stackgap_init();
488 p = stackgap_alloc(&sg, sizeof(struct itimerval));
489 uap->itv = (struct itimerval32 *)p;
490 }
491 error = getitimer(td, (struct getitimer_args *) uap);
492 if (error)
493 return (error);
494 if (p32) {
495 error = copyin(p, &s, sizeof(s));
496 if (error)
497 return (error);
498 TV_CP(s, s32, it_interval);
499 TV_CP(s, s32, it_value);
500 error = copyout(&s32, p32, sizeof(s32));
501 }
502 return (error);
503}
504
505int
478freebsd32_select(struct thread *td, struct freebsd32_select_args *uap)
479{
480 int error;
481 caddr_t sg;
482 struct timeval32 *p32, s32;
483 struct timeval *p = NULL, s;
484
485 p32 = uap->tv;

--- 791 unchanged lines hidden ---
506freebsd32_select(struct thread *td, struct freebsd32_select_args *uap)
507{
508 int error;
509 caddr_t sg;
510 struct timeval32 *p32, s32;
511 struct timeval *p = NULL, s;
512
513 p32 = uap->tv;

--- 791 unchanged lines hidden ---