Esempio n. 1
0
void up_task_start(main_t taskentry, int argc, FAR char *argv[])
{
  /* Let sys_call3() do all of the work */

  sys_call3(SYS_task_start, (uintptr_t)taskentry, (uintptr_t)argc,
            (uintptr_t)argv);
}
Esempio n. 2
0
_WCRTLINK int fcntl( int __fildes, int __cmd, ... )
{
    u_long      rest;
    va_list     args;
    u_long      res;

    va_start( args, __cmd );
    rest = va_arg( args, u_long );
    va_end( args );
    res = sys_call3( SYS_fcntl, (u_long)__fildes, (u_long)__cmd, rest );
    __syscall_return( int, res );
}
Esempio n. 3
0
static int __sysconf_nprocessors( void )
{
    syscall_res res;
    unsigned char mask[128];
    int ret;
    int i;

    res = sys_call3( SYS_sched_getaffinity, (u_long)0, (u_long)(sizeof(mask)), (u_long)mask );
    ret = 0;
    for( i = 0; i < sizeof( mask ); i++ ) {
        while( mask[i] ) {
            mask[i] &= mask[i] - 1;
            ret++;
        }
    }
    return( ret );
}
Esempio n. 4
0
_WCRTLINK ssize_t writev( int __fd, const struct iovec *__v, int __vcnt )
{
    syscall_res res = sys_call3( SYS_writev, (u_long)__fd, (u_long)__v, (u_long)__vcnt );
    __syscall_return( ssize_t, res );
}
Esempio n. 5
0
_WCRTLINK pid_t waitpid( pid_t __pid, __WAIT_STATUS __stat_loc, int __options )
{
    u_long res = sys_call3( SYS_waitpid, __pid, (u_long)__stat_loc,
                           (u_long)__options );
    __syscall_return( pid_t, res );
}
Esempio n. 6
0
off_t __lseek( int __fildes, off_t __offset, int __whence )
{
    syscall_res res = sys_call3( SYS_lseek, __fildes, __offset, __whence );
    __syscall_return( off_t, res );
}
Esempio n. 7
0
_WCRTLINK ssize_t write( int __fildes, const void *__buf, size_t __len )
{
    syscall_res res = sys_call3( SYS_write, __fildes, (u_long)__buf, __len );
    __syscall_return( ssize_t, res );
}
Esempio n. 8
0
_WCRTLINK int ioperm( unsigned long __from, unsigned long __num, int __turn_on )
{
    u_long res = sys_call3( SYS_ioperm, __from, __num, __turn_on );
    __syscall_return( int, res );
}