????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.36 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/modules/3.13.0-49-generic/build/arch/blackfin/include/asm/ |
Upload File : |
/*
* Magic syscall break down functions
*
* Copyright 2010 Analog Devices Inc.
*
* Licensed under the GPL-2 or later.
*/
#ifndef __ASM_BLACKFIN_SYSCALL_H__
#define __ASM_BLACKFIN_SYSCALL_H__
/*
* Blackfin syscalls are simple:
* enter:
* p0: syscall number
* r{0,1,2,3,4,5}: syscall args 0,1,2,3,4,5
* exit:
* r0: return/error value
*/
#include <linux/err.h>
#include <linux/sched.h>
#include <asm/ptrace.h>
static inline long
syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
{
return regs->p0;
}
static inline void
syscall_rollback(struct task_struct *task, struct pt_regs *regs)
{
regs->p0 = regs->orig_p0;
}
static inline long
syscall_get_error(struct task_struct *task, struct pt_regs *regs)
{
return IS_ERR_VALUE(regs->r0) ? regs->r0 : 0;
}
static inline long
syscall_get_return_value(struct task_struct *task, struct pt_regs *regs)
{
return regs->r0;
}
static inline void
syscall_set_return_value(struct task_struct *task, struct pt_regs *regs,
int error, long val)
{
regs->r0 = error ? -error : val;
}
/**
* syscall_get_arguments()
* @task: unused
* @regs: the register layout to extract syscall arguments from
* @i: first syscall argument to extract
* @n: number of syscall arguments to extract
* @args: array to return the syscall arguments in
*
* args[0] gets i'th argument, args[n - 1] gets the i+n-1'th argument
*/
static inline void
syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
unsigned int i, unsigned int n, unsigned long *args)
{
/*
* Assume the ptrace layout doesn't change -- r5 is first in memory,
* then r4, ..., then r0. So we simply reverse the ptrace register
* array in memory to store into the args array.
*/
long *aregs = ®s->r0 - i;
BUG_ON(i > 5 || i + n > 6);
while (n--)
*args++ = *aregs--;
}
/* See syscall_get_arguments() comments */
static inline void
syscall_set_arguments(struct task_struct *task, struct pt_regs *regs,
unsigned int i, unsigned int n, const unsigned long *args)
{
long *aregs = ®s->r0 - i;
BUG_ON(i > 5 || i + n > 6);
while (n--)
*aregs-- = *args++;
}
#endif