Beispiel #1
0
int main()
{
    printf("\nNAME            PID\n");
    printf("-----------------------\n");
    __syscall0(SYSCALL_PS);
     return 0;
}
Beispiel #2
0
void child()
{
    char* argv[] = { "server", 0 };
    int pid = __syscall0(__NR_fork);
    if (pid == 0)
    {
	__syscall3(__NR_execve, (long) "./sslserver", (long) argv, (long) envp);
        myerror("exec");
        __syscall1(__NR_exit, 1);
    }
    else if (pid < 0)
    {
        errno = -pid;
        myerror("fork");
        __syscall1(__NR_exit, 1);
    }
}
Beispiel #3
0
//#include<stdio.h>
int fork() {
  int a = __syscall0(SYS_FORK);
  //printf("DEBUG: fork(): returning value: %d %d\n",a,ret);
  dummy_call(a);
  return a;
}
Beispiel #4
0
void exit(int status) {
	//int ret_val = 0;
        __syscall0(1);
}
Beispiel #5
0
/* return id for current thread */
thread_id sys_current_thread_id(void)
{
    return __syscall0(SYSCALL_CURRENT_THREAD_ID);
}
Beispiel #6
0
void shutdown(int status) {                                                                                                                    
     __syscall0(25);   
}
Beispiel #7
0
void xm_suspend_domain (void) {
    int res;
    __syscall0(suspend_domain_nr, res);
}
Beispiel #8
0
void listProcesses() {
  __syscall0(SYS_LISTPROCESSES);
}
Beispiel #9
0
uint64_t get_pid(){
	return __syscall0(GETPID);
}
Beispiel #10
0
void yield(){
	__syscall0(YIELD);
}
Beispiel #11
0
void clrscr(){
	 __syscall0(CLRSCR);
}
Beispiel #12
0
uint16_t getpid() {
	//int ret_val = 0;
        __syscall0(2);
	uint16_t * getpid = (uint16_t *)0xfffffe0000000000;
        return getpid[0];
}
Beispiel #13
0
int fork() {
	int ret = __syscall0(6);
	return ret;
}
Beispiel #14
0
pid_t fork(void)
{
	return __syscall0(SYS_FORK);
}
Beispiel #15
0
int64_t fork() {
    return (uint64_t)__syscall0(FORK);
}
Beispiel #16
0
void ls() {
	__syscall0(5);
}
Beispiel #17
0
/* null syscall */
status_t sys_null(void)
{
    return __syscall0(SYSCALL_NULL);
}
Beispiel #18
0
void hw_sti (void) {
  long __res;
  __syscall0 (hw_sti_nr, __res);
}
Beispiel #19
0
/* pass control to another thread */
void sys_thread_yield(void)
{
    __syscall0(SYSCALL_THREAD_YIELD);
}
Beispiel #20
0
static void xm_sync_events (void) {
    int res;
    __syscall0(sync_events_nr, res);
}
Beispiel #21
0
pthread_t pthread_self (void) {
  long __res;
  __syscall0 (pthread_self_nr, __res);
  return (pthread_t) __res;
}