├── Makefile ├── allconfig ├── boot ├── Makefile ├── arm │ ├── Makefile │ ├── arm │ │ ├── boot.ld │ │ ├── elf_reloc.c │ │ └── head.S │ ├── at91x40 │ │ ├── Makefile │ │ ├── ebi.h │ │ ├── head.S │ │ └── machdep.c │ ├── beagle │ │ ├── Makefile │ │ └── machdep.c │ ├── gba │ │ ├── Makefile │ │ ├── head.S │ │ └── machdep.c │ ├── include │ │ ├── arch.h │ │ └── syspage.h │ └── integrator │ │ ├── Makefile │ │ └── machdep.c ├── common │ ├── Makefile │ ├── debug.c │ ├── elf.c │ ├── load.c │ └── main.c ├── i386 │ ├── Makefile │ ├── i386 │ │ ├── boot.ld │ │ └── elf_reloc.c │ ├── include │ │ ├── arch.h │ │ └── syspage.h │ ├── pc │ │ ├── Makefile │ │ ├── head.S │ │ └── machdep.c │ └── utils │ │ ├── Makefile │ │ ├── bootsect │ │ ├── Makefile │ │ ├── bootsect.S │ │ └── bootsect.ld │ │ └── mkboot │ │ ├── Makefile │ │ ├── mkboot.ld │ │ └── mkboot.s ├── include │ ├── ar.h │ ├── boot.h │ ├── bootlib.h │ ├── elf.h │ └── platform.h └── lib │ ├── Makefile │ ├── stdlib.c │ └── string.c ├── conf ├── arm │ ├── config.at91x40 │ ├── config.beagle │ ├── config.gba │ ├── config.integrator │ └── config.integrator-nommu ├── etc │ └── config.cmdbox └── i386 │ ├── config.pc │ └── config.pc-tiny ├── configure ├── dev ├── Makefile ├── arm │ ├── Makefile │ ├── arm │ │ └── dev.ld │ ├── at91x40 │ │ ├── Makefile │ │ ├── led.c │ │ ├── pio.c │ │ ├── pio.h │ │ ├── serial.c │ │ └── wdt.c │ ├── beagle │ │ ├── Makefile │ │ ├── platform.h │ │ └── serial.c │ ├── gba │ │ ├── Makefile │ │ ├── console.c │ │ ├── font.h │ │ ├── kbd_img.h │ │ ├── keymap.h │ │ ├── keypad.c │ │ ├── keypad.h │ │ ├── lcd.h │ │ └── swkbd.c │ └── integrator │ │ ├── Makefile │ │ ├── rtc.c │ │ └── serial.c ├── core │ ├── Makefile │ └── main.c ├── gen │ ├── Makefile │ ├── null.c │ ├── ramdisk.c │ ├── tty.c │ └── zero.c ├── i386 │ ├── Makefile │ ├── i386 │ │ ├── cpu.c │ │ ├── cpufunc.S │ │ └── dev.ld │ ├── include │ │ └── cpufunc.h │ └── pc │ │ ├── Makefile │ │ ├── console.c │ │ ├── dma.c │ │ ├── dma.h │ │ ├── fdd.c │ │ ├── kbd.c │ │ ├── kmc.h │ │ ├── mouse.c │ │ ├── rtc.c │ │ └── serial.c ├── include │ ├── console.h │ ├── cpu.h │ ├── cpufreq.h │ ├── driver.h │ ├── drvlib.h │ ├── event.h │ ├── pm.h │ └── queue.h └── power │ ├── Makefile │ ├── cpufreq.c │ └── pm.c ├── doc ├── ChangeLog ├── LICENSE ├── README └── html │ ├── default.css │ ├── doc │ ├── appguide.html │ ├── arch.html │ ├── build.html │ ├── cmdbox.html │ ├── debug.html │ ├── dki.html │ ├── driver.html │ ├── gba.html │ ├── img │ │ ├── arch.gif │ │ ├── checkmark.png │ │ ├── doc_icon.gif │ │ ├── emulate.gif │ │ ├── event.gif │ │ ├── gbakbd.png │ │ ├── ipc.gif │ │ ├── ipcmap.gif │ │ ├── irq.gif │ │ ├── kernel.gif │ │ ├── memmap.gif │ │ ├── memory.gif │ │ ├── msg.gif │ │ ├── overview.gif │ │ ├── power.gif │ │ ├── thread.gif │ │ └── usbcable.jpg │ ├── index.html │ ├── integrator.html │ ├── kapi.html │ ├── kernel.html │ ├── license.html │ ├── overview.html │ ├── pc.html │ ├── posix.html │ ├── power.html │ ├── prex_datasheet.pdf │ ├── sample.html │ └── standard.html │ ├── img │ ├── allow.png │ ├── background.gif │ ├── bg.gif │ ├── bullet.gif │ ├── checkmark.png │ ├── grad.gif │ ├── logo.gif │ ├── menu_bottom.gif │ └── menu_top.gif │ ├── index.html │ └── print.css ├── include ├── arm │ ├── asm.h │ ├── elf.h │ ├── endian.h │ ├── limits.h │ ├── setjmp.h │ ├── signal.h │ ├── stdarg.h │ ├── systrap.h │ └── types.h ├── i386 │ ├── asm.h │ ├── elf.h │ ├── endian.h │ ├── limits.h │ ├── setjmp.h │ ├── signal.h │ ├── stdarg.h │ ├── systrap.h │ └── types.h ├── machine │ ├── asm.h │ ├── elf.h │ ├── endian.h │ ├── limits.h │ ├── lock.h │ ├── setjmp.h │ ├── signal.h │ ├── stdarg.h │ ├── systrap.h │ └── types.h ├── prex │ ├── bootinfo.h │ ├── capability.h │ ├── device.h │ ├── elf.h │ ├── ioctl.h │ ├── keycode.h │ ├── message.h │ ├── posix.h │ ├── prex.h │ ├── pthreadtypes.h │ ├── signal.h │ ├── sysinfo.h │ └── types.h ├── server │ ├── exec.h │ ├── fs.h │ ├── object.h │ ├── proc.h │ └── stdmsg.h ├── stdint.h ├── sys │ ├── buf.h │ ├── cdefs.h │ ├── dirent.h │ ├── elf.h │ ├── endian.h │ ├── errno.h │ ├── fcntl.h │ ├── file.h │ ├── ioctl.h │ ├── list.h │ ├── mount.h │ ├── param.h │ ├── reboot.h │ ├── resource.h │ ├── signal.h │ ├── stat.h │ ├── syslimits.h │ ├── syslog.h │ ├── termios.h │ ├── time.h │ ├── tty.h │ ├── types.h │ ├── utsname.h │ ├── vnode.h │ └── wait.h └── verbose.h ├── mk ├── Makefile ├── Makefile.inc ├── boot.mk ├── dev.mk ├── lib.mk ├── obj.mk ├── own.mk ├── prog.mk ├── subdir.mk ├── sys.mk └── task.mk ├── sys ├── Makefile ├── arch │ ├── Makefile │ ├── arm │ │ ├── Makefile │ │ ├── arm │ │ │ ├── context.c │ │ │ ├── cpu.c │ │ │ ├── cpufunc.S │ │ │ ├── kernel.ld │ │ │ ├── locore.S │ │ │ ├── mmu.c │ │ │ └── trap.c │ │ ├── at91x40 │ │ │ ├── Makefile │ │ │ ├── clock.c │ │ │ ├── diag.c │ │ │ ├── interrupt.c │ │ │ ├── machdep.c │ │ │ └── platform.h │ │ ├── beagle │ │ │ ├── Makefile │ │ │ ├── clock.c │ │ │ ├── diag.c │ │ │ ├── interrupt.c │ │ │ ├── machdep.c │ │ │ └── platform.h │ │ ├── gba │ │ │ ├── Makefile │ │ │ ├── clock.c │ │ │ ├── diag.c │ │ │ ├── font.h │ │ │ ├── interrupt.c │ │ │ ├── locore_gba.S │ │ │ ├── machdep.c │ │ │ └── platform.h │ │ ├── include │ │ │ ├── context.h │ │ │ ├── cpu.h │ │ │ ├── cpufunc.h │ │ │ ├── locore.h │ │ │ ├── mmu.h │ │ │ ├── platform.h │ │ │ └── syspage.h │ │ └── integrator │ │ │ ├── Makefile │ │ │ ├── clock.c │ │ │ ├── diag.c │ │ │ ├── interrupt.c │ │ │ ├── machdep.c │ │ │ └── platform.h │ └── i386 │ │ ├── Makefile │ │ ├── i386 │ │ ├── context.c │ │ ├── cpu.c │ │ ├── cpufunc.S │ │ ├── kernel.ld │ │ ├── locore.S │ │ ├── mmu.c │ │ └── trap.c │ │ ├── include │ │ ├── context.h │ │ ├── cpu.h │ │ ├── cpufunc.h │ │ ├── locore.h │ │ ├── mmu.h │ │ ├── platform.h │ │ └── syspage.h │ │ └── pc │ │ ├── Makefile │ │ ├── clock.c │ │ ├── diag.c │ │ ├── interrupt.c │ │ ├── machdep.c │ │ └── platform.h ├── include │ ├── arch.h │ ├── debug.h │ ├── device.h │ ├── event.h │ ├── exception.h │ ├── ipc.h │ ├── irq.h │ ├── kernel.h │ ├── kmem.h │ ├── kpage.h │ ├── page.h │ ├── queue.h │ ├── sched.h │ ├── sync.h │ ├── system.h │ ├── task.h │ ├── thread.h │ ├── timer.h │ ├── version.h │ └── vm.h ├── ipc │ ├── Makefile │ ├── msg.c │ └── object.c ├── kern │ ├── Makefile │ ├── debug.c │ ├── device.c │ ├── dki.c │ ├── exception.c │ ├── irq.c │ ├── main.c │ ├── sched.c │ ├── syscalls.c │ ├── system.c │ ├── task.c │ ├── thread.c │ └── timer.c ├── lib │ ├── Makefile │ ├── atol.c │ ├── delay.c │ ├── htonl.c │ ├── htons.c │ ├── memcpy.c │ ├── memset.c │ ├── ntohl.c │ ├── ntohs.c │ ├── queue.c │ ├── sprintf.c │ ├── strlcpy.c │ ├── strncmp.c │ ├── strncpy.c │ ├── strnlen.c │ └── vsprintf.c ├── mem │ ├── Makefile │ ├── kmem.c │ ├── kpage.c │ ├── page.c │ ├── vm.c │ └── vm_nommu.c └── sync │ ├── Makefile │ ├── cond.c │ ├── mutex.c │ └── sem.c └── usr ├── Makefile ├── arch ├── arm │ ├── _systrap.S │ ├── crt0.S │ ├── elf_reloc.c │ ├── setjmp.S │ ├── user-nommu.ld │ └── user.ld └── i386 │ ├── _systrap.S │ ├── crt0.S │ ├── elf_reloc.c │ ├── setjmp.S │ ├── user-nommu.ld │ └── user.ld ├── bin ├── Makefile ├── cal │ ├── Makefile │ └── cal.c ├── cat │ ├── Makefile │ └── cat.c ├── clear │ ├── Makefile │ └── clear.c ├── cmdbox │ ├── Makefile │ ├── cmd_conf.c │ ├── cmdbox.h │ └── main.c ├── cp │ ├── Makefile │ └── cp.c ├── date │ ├── Makefile │ └── date.c ├── dmesg │ ├── Makefile │ └── dmesg.c ├── echo │ ├── Makefile │ └── echo.c ├── free │ ├── Makefile │ └── free.c ├── head │ ├── Makefile │ └── head.c ├── hostname │ ├── Makefile │ └── hostname.c ├── init │ ├── Makefile │ └── init.c ├── kill │ ├── Makefile │ └── kill.c ├── ls │ ├── Makefile │ └── ls.c ├── mkdir │ ├── Makefile │ └── mkdir.c ├── mkfifo │ ├── Makefile │ └── mkfifo.c ├── mount │ ├── Makefile │ └── mount.c ├── mv │ ├── Makefile │ └── mv.c ├── nice │ ├── Makefile │ └── nice.c ├── ps │ ├── Makefile │ └── ps.c ├── pwd │ ├── Makefile │ └── pwd.c ├── reboot │ ├── Makefile │ └── reboot.c ├── rm │ ├── Makefile │ └── rm.c ├── rmdir │ ├── Makefile │ └── rmdir.c ├── sh │ ├── Makefile │ ├── cd.c │ ├── cmds.c │ ├── exec.c │ ├── jobs.c │ ├── sh.c │ └── sh.h ├── shutdown │ ├── Makefile │ └── shutdown.c ├── sleep │ ├── Makefile │ └── sleep.c ├── sync │ ├── Makefile │ └── sync.c ├── test │ ├── Makefile │ └── test.c ├── touch │ ├── Makefile │ └── touch.c ├── umount │ ├── Makefile │ └── umount.c └── uname │ ├── Makefile │ └── uname.c ├── include ├── ar.h ├── assert.h ├── ctype.h ├── dirent.h ├── err.h ├── errno.h ├── fcntl.h ├── fstab.h ├── libgen.h ├── limits.h ├── math.h ├── paths.h ├── pthread.h ├── sched.h ├── setjmp.h ├── signal.h ├── stdarg.h ├── stdbool.h ├── stddef.h ├── stdio.h ├── stdlib.h ├── string.h ├── termios.h ├── time.h ├── tzfile.h └── unistd.h ├── lib ├── Makefile ├── crt │ ├── Makefile │ └── crt1.c ├── libc │ ├── Makefile │ ├── ctype │ │ ├── Makefile.inc │ │ ├── isalnum.c │ │ ├── isalpha.c │ │ ├── isblank.c │ │ ├── iscntrl.c │ │ ├── isdigit.c │ │ ├── isgraph.c │ │ ├── islower.c │ │ ├── isprint.c │ │ ├── ispunct.c │ │ ├── isspace.c │ │ ├── isupper.c │ │ ├── isxdigit.c │ │ ├── tolower.c │ │ └── toupper.c │ ├── errno │ │ ├── Makefile.inc │ │ ├── errlst.c │ │ └── errno.c │ ├── gen │ │ ├── Makefile.inc │ │ ├── __libc_init.c │ │ ├── assert.c │ │ ├── basename.c │ │ ├── confstr.c │ │ ├── dirname.c │ │ ├── err.c │ │ ├── errx.c │ │ ├── execl.c │ │ ├── execle.c │ │ ├── execlp.c │ │ ├── execv.c │ │ ├── execvp.c │ │ ├── gethostname.c │ │ ├── getpagesize.c │ │ ├── isatty.c │ │ ├── sethostname.c │ │ ├── time.c │ │ ├── verr.c │ │ ├── verrx.c │ │ ├── vwarn.c │ │ ├── vwarnx.c │ │ ├── warn.c │ │ └── warnx.c │ ├── stdio │ │ ├── Makefile.inc │ │ ├── clrerr.c │ │ ├── fclose.c │ │ ├── fdopen.c │ │ ├── feof.c │ │ ├── ferror.c │ │ ├── fflush.c │ │ ├── fgetc.c │ │ ├── fgetpos.c │ │ ├── fgets.c │ │ ├── fileno.c │ │ ├── findfp.c │ │ ├── flags.c │ │ ├── fopen.c │ │ ├── fprintf.c │ │ ├── fpurge.c │ │ ├── fputc.c │ │ ├── fputs.c │ │ ├── fread.c │ │ ├── freopen.c │ │ ├── fscanf.c │ │ ├── fseek.c │ │ ├── fsetpos.c │ │ ├── ftell.c │ │ ├── fvwrite.c │ │ ├── fvwrite.h │ │ ├── fwalk.c │ │ ├── fwrite.c │ │ ├── getc.c │ │ ├── getchar.c │ │ ├── gets.c │ │ ├── getw.c │ │ ├── local.h │ │ ├── makebuf.c │ │ ├── mktemp.c │ │ ├── perror.c │ │ ├── printf.c │ │ ├── putc.c │ │ ├── putchar.c │ │ ├── puts.c │ │ ├── putw.c │ │ ├── refill.c │ │ ├── remove.c │ │ ├── rewind.c │ │ ├── scanf.c │ │ ├── setbuf.c │ │ ├── setbuffer.c │ │ ├── setvbuf.c │ │ ├── snprintf.c │ │ ├── sprintf.c │ │ ├── sscanf.c │ │ ├── stdio.c │ │ ├── tempnam.c │ │ ├── tmpfile.c │ │ ├── tmpnam.c │ │ ├── ungetc.c │ │ ├── vfprintf.c │ │ ├── vfscanf.c │ │ ├── vprintf.c │ │ ├── vscanf.c │ │ ├── vsnprintf.c │ │ ├── vsprintf.c │ │ ├── vsscanf.c │ │ └── wsetup.c │ ├── stdlib │ │ ├── Makefile.inc │ │ ├── abort.c │ │ ├── abs.c │ │ ├── atexit.c │ │ ├── atexit.h │ │ ├── atof.c │ │ ├── atoi.c │ │ ├── atol.c │ │ ├── calloc.c │ │ ├── div.c │ │ ├── exit.c │ │ ├── getenv.c │ │ ├── getopt.c │ │ ├── getsubopt.c │ │ ├── qsort.c │ │ ├── rand.c │ │ ├── random.c │ │ ├── setenv.c │ │ ├── strtol.c │ │ └── strtoul.c │ ├── string │ │ ├── Makefile.inc │ │ ├── bcmp.c │ │ ├── bcopy.c │ │ ├── bzero.c │ │ ├── ffs.c │ │ ├── index.c │ │ ├── memccpy.c │ │ ├── memchr.c │ │ ├── memcmp.c │ │ ├── memcpy.c │ │ ├── memmove.c │ │ ├── memset.c │ │ ├── rindex.c │ │ ├── strcasecmp.c │ │ ├── strcat.c │ │ ├── strchr.c │ │ ├── strcmp.c │ │ ├── strcoll.c │ │ ├── strcpy.c │ │ ├── strcspn.c │ │ ├── strdup.c │ │ ├── strerror.c │ │ ├── strlcat.c │ │ ├── strlcpy.c │ │ ├── strlen.c │ │ ├── strmode.c │ │ ├── strncat.c │ │ ├── strncmp.c │ │ ├── strncpy.c │ │ ├── strnlen.c │ │ ├── strpbrk.c │ │ ├── strrchr.c │ │ ├── strsep.c │ │ ├── strspn.c │ │ ├── strstr.c │ │ ├── strtok.c │ │ ├── strtok_r.c │ │ ├── strxfrm.c │ │ └── swab.c │ ├── termios │ │ ├── Makefile.inc │ │ ├── cfgetispeed.c │ │ ├── cfgetospeed.c │ │ ├── cfmakeraw.c │ │ ├── cfsetispeed.c │ │ ├── cfsetospeed.c │ │ ├── cfsetspeed.c │ │ ├── tcdrain.c │ │ ├── tcflow.c │ │ ├── tcflush.c │ │ ├── tcgetattr.c │ │ ├── tcgetpgrp.c │ │ ├── tcsendbreak.c │ │ ├── tcsetattr.c │ │ └── tcsetpgrp.c │ └── time │ │ ├── Makefile.inc │ │ ├── asctime.c │ │ ├── asctime_r.c │ │ ├── gmtime.c │ │ ├── gmtime_r.c │ │ ├── localtime.c │ │ ├── localtime_r.c │ │ ├── mktime.c │ │ └── strftime.c ├── libpthread │ └── Makefile ├── libsa │ ├── Makefile │ ├── __libc_init.c │ ├── _exit.c │ ├── _stdio.c │ ├── assert.c │ ├── getchar.c │ ├── printf.c │ ├── putchar.c │ ├── puts.c │ ├── sigstub.c │ ├── sprintf.c │ ├── syslog.c │ └── vsprintf.c ├── posix │ ├── Makefile.inc │ ├── exec │ │ ├── Makefile.inc │ │ └── execve.c │ ├── file │ │ ├── Makefile.inc │ │ ├── __file.c │ │ ├── access.c │ │ ├── chdir.c │ │ ├── chmod.c │ │ ├── chown.c │ │ ├── close.c │ │ ├── closedir.c │ │ ├── creat.c │ │ ├── dup.c │ │ ├── dup2.c │ │ ├── fcntl.c │ │ ├── fstat.c │ │ ├── fsync.c │ │ ├── getcwd.c │ │ ├── ioctl.c │ │ ├── link.c │ │ ├── lseek.c │ │ ├── lstat.c │ │ ├── mkdir.c │ │ ├── mkfifo.c │ │ ├── mknod.c │ │ ├── mount.c │ │ ├── open.c │ │ ├── opendir.c │ │ ├── pipe.c │ │ ├── read.c │ │ ├── readdir.c │ │ ├── rename.c │ │ ├── rewinddir.c │ │ ├── rmdir.c │ │ ├── stat.c │ │ ├── sync.c │ │ ├── umask.c │ │ ├── umount.c │ │ ├── unlink.c │ │ └── write.c │ ├── gen │ │ ├── Makefile.inc │ │ ├── __posix_call.c │ │ ├── __posix_init.c │ │ ├── alarm.c │ │ ├── reboot.c │ │ ├── syslog.c │ │ └── uname.c │ ├── process │ │ ├── Makefile.inc │ │ ├── __process.c │ │ ├── _exit.c │ │ ├── fork.c │ │ ├── getegid.c │ │ ├── geteuid.c │ │ ├── getgid.c │ │ ├── getpgid.c │ │ ├── getpgrp.c │ │ ├── getpid.c │ │ ├── getppid.c │ │ ├── getpriority.c │ │ ├── getsid.c │ │ ├── gettask.c │ │ ├── getuid.c │ │ ├── kill.c │ │ ├── killpg.c │ │ ├── nice.c │ │ ├── setegid.c │ │ ├── seteuid.c │ │ ├── setgid.c │ │ ├── setpgid.c │ │ ├── setpgrp.c │ │ ├── setpriority.c │ │ ├── setsid.c │ │ ├── setuid.c │ │ ├── sleep.c │ │ ├── wait.c │ │ └── waitpid.c │ ├── pthread │ │ ├── Makefile.inc │ │ ├── pthread_attr_getschedparam.c │ │ ├── pthread_attr_getschedpolicy.c │ │ ├── pthread_attr_getstacksize.c │ │ ├── pthread_attr_init.c │ │ ├── pthread_attr_setname.c │ │ ├── pthread_attr_setschedparam.c │ │ ├── pthread_attr_setschedpolicy.c │ │ ├── pthread_attr_setspecific.c │ │ ├── pthread_attr_setstacksize.c │ │ └── pthread_create.c │ ├── signal │ │ ├── Makefile.inc │ │ ├── __exception.c │ │ ├── pause.c │ │ ├── sigaction.c │ │ ├── sigcompat.c │ │ ├── siglist.c │ │ ├── signal.c │ │ ├── sigpending.c │ │ ├── sigprocmask.c │ │ └── sigsuspend.c │ └── time │ │ ├── Makefile.inc │ │ └── gettimeofday.c └── prex │ ├── Makefile.inc │ ├── gen │ ├── Makefile.inc │ ├── dprintf.c │ └── panic.c │ ├── malloc │ ├── Makefile.inc │ ├── malloc.c │ ├── malloc.h │ ├── malloc_r.c │ └── realloc.c │ └── syscalls │ ├── Makefile.inc │ ├── _cond_wait.S │ ├── _mutex_lock.S │ ├── _sem_wait.S │ ├── _timer_waitperiod.S │ ├── cond_broadcast.S │ ├── cond_destroy.S │ ├── cond_init.S │ ├── cond_signal.S │ ├── cond_wait.c │ ├── device_close.S │ ├── device_ioctl.S │ ├── device_open.S │ ├── device_read.S │ ├── device_write.S │ ├── exception_raise.S │ ├── exception_return.S │ ├── exception_setup.S │ ├── exception_wait.S │ ├── msg_receive.S │ ├── msg_reply.S │ ├── msg_send.S │ ├── mutex_destroy.S │ ├── mutex_init.S │ ├── mutex_lock.c │ ├── mutex_trylock.S │ ├── mutex_unlock.S │ ├── object_create.S │ ├── object_destroy.S │ ├── object_lookup.S │ ├── sem_destroy.S │ ├── sem_getvalue.S │ ├── sem_init.S │ ├── sem_post.S │ ├── sem_trywait.S │ ├── sem_wait.c │ ├── sys_debug.S │ ├── sys_info.S │ ├── sys_log.S │ ├── sys_panic.S │ ├── sys_time.S │ ├── syscall.h │ ├── task_create.S │ ├── task_getcap.S │ ├── task_name.S │ ├── task_resume.S │ ├── task_self.S │ ├── task_setcap.S │ ├── task_suspend.S │ ├── task_terminate.S │ ├── thread_create.S │ ├── thread_getpolicy.c │ ├── thread_getprio.c │ ├── thread_load.S │ ├── thread_name.S │ ├── thread_resume.S │ ├── thread_schedparam.S │ ├── thread_self.S │ ├── thread_setpolicy.c │ ├── thread_setprio.c │ ├── thread_suspend.S │ ├── thread_terminate.S │ ├── thread_yield.S │ ├── timer_alarm.S │ ├── timer_periodic.S │ ├── timer_sleep.S │ ├── timer_waitperiod.c │ ├── vm_allocate.S │ ├── vm_attribute.S │ ├── vm_free.S │ └── vm_map.S ├── sample ├── Makefile ├── alarm │ ├── Makefile │ └── alarm.c ├── balls │ ├── Makefile │ └── balls.c ├── bench │ ├── Makefile │ └── bench.c ├── cpumon │ ├── Makefile │ └── cpumon.c ├── hello │ ├── Makefile │ └── hello.c ├── ipc │ ├── Makefile │ └── ipc.c ├── mutex │ ├── Makefile │ └── mutex.c ├── sem │ ├── Makefile │ └── sem.c ├── task │ ├── Makefile │ └── task.c ├── tetris │ ├── Makefile │ ├── input.c │ ├── input.h │ ├── screen.c │ ├── screen.h │ ├── shapes.c │ ├── tetris.c │ └── tetris.h └── thread │ ├── Makefile │ └── thread.c ├── server ├── Makefile ├── boot │ ├── Makefile │ ├── fstab.c │ └── main.c ├── exec │ ├── Makefile │ ├── args.c │ ├── elf.c │ ├── exec.h │ ├── exec_conf.c │ └── main.c ├── fs │ ├── Makefile │ ├── arfs │ │ ├── Makefile │ │ ├── arfs.h │ │ ├── arfs_vfsops.c │ │ └── arfs_vnops.c │ ├── devfs │ │ ├── Makefile │ │ ├── devfs.h │ │ └── devfs_vnops.c │ ├── fatfs │ │ ├── Makefile │ │ ├── fatfs.h │ │ ├── fatfs_fat.c │ │ ├── fatfs_node.c │ │ ├── fatfs_subr.c │ │ ├── fatfs_vfsops.c │ │ └── fatfs_vnops.c │ ├── fifofs │ │ ├── Makefile │ │ ├── fifo.h │ │ └── fifo_vnops.c │ ├── ramfs │ │ ├── Makefile │ │ ├── ramfs.h │ │ ├── ramfs_vfsops.c │ │ └── ramfs_vnops.c │ └── vfs │ │ ├── Makefile │ │ ├── main.c │ │ ├── vfs.h │ │ ├── vfs_bio.c │ │ ├── vfs_conf.c │ │ ├── vfs_lookup.c │ │ ├── vfs_mount.c │ │ ├── vfs_syscalls.c │ │ ├── vfs_task.c │ │ └── vfs_vnode.c └── proc │ ├── Makefile │ ├── exit.c │ ├── fork.c │ ├── hash.c │ ├── kill.c │ ├── main.c │ ├── pid.c │ ├── proc.h │ └── tty.c └── test ├── Makefile ├── args ├── Makefile └── args.c ├── cap ├── Makefile └── cap.c ├── console ├── Makefile └── console.c ├── deadlock ├── Makefile └── deadlock.c ├── debug ├── Makefile └── debug.c ├── dvs ├── Makefile └── dvs.c ├── errno ├── Makefile └── errno.c ├── exception ├── Makefile └── exception.c ├── fault ├── Makefile └── fault.c ├── fdd ├── Makefile └── fdd.c ├── fifo ├── Makefile └── fifo.c ├── fifo2 ├── Makefile └── fifo.c ├── fileio ├── Makefile └── fileio.c ├── ipc ├── Makefile └── ipc.c ├── ipc_mt ├── Makefile └── ipc_mt.c ├── kbd ├── Makefile └── kbd.c ├── kmon ├── Makefile ├── cmd.c └── kmon.c ├── led ├── Makefile └── led.c ├── malloc ├── Makefile └── malloc.c ├── mutex ├── Makefile └── mutex.c ├── pipe ├── Makefile └── pipe.c ├── ramdisk ├── Makefile └── ramdisk.c ├── reset ├── Makefile └── reset.c ├── sem ├── Makefile └── sem.c ├── signal ├── Makefile └── signal.c ├── stderr ├── Makefile └── stderr.c ├── task ├── Makefile └── task.c ├── thread ├── Makefile └── thread.c ├── time ├── Makefile └── time.c ├── timer ├── Makefile └── timer.c ├── vfork ├── Makefile └── vfork.c └── zero ├── Makefile └── zero.c /Makefile: -------------------------------------------------------------------------------- 1 | ifndef BUILDDIR 2 | export BUILDDIR:=$(shell pwd) 3 | endif 4 | -include $(BUILDDIR)/conf/config.mk 5 | 6 | ifndef SRCDIR 7 | ifdef MAKECMDGOALS 8 | $(MAKECMDGOALS): 9 | else 10 | all: 11 | endif 12 | @echo Error: $(BUILDDIR) is not configured 13 | @exit 1 14 | 15 | else 16 | ifdef FROMDIR 17 | SUBDIR= $(FROMDIR) 18 | else 19 | SUBDIR= boot dev sys usr mk 20 | endif 21 | include $(SRCDIR)/mk/subdir.mk 22 | 23 | #for parallel make 24 | ifndef FROMDIR 25 | sys: dev 26 | mk: boot dev sys usr 27 | endif 28 | 29 | endif 30 | -------------------------------------------------------------------------------- /allconfig: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # sanity 4 | if [ "x$1" == x ]; then 5 | echo no base directory specified 6 | exit 1 7 | fi 8 | 9 | # create folders 10 | base=$1 11 | shift 12 | 13 | # configure arm targets 14 | targets="arm-gba arm-integrator arm-integrator-nommu arm-beagle" 15 | ./configure --build=$base/arm-gba --target=arm-gba $* || exit 1 16 | ./configure --build=$base/arm-integrator --target=arm-integrator $* || exit 1 17 | ./configure --build=$base/arm-integrator-nommu --target=arm-integrator \ 18 | --profile=nommu $* || exit 1 19 | ./configure --build=$base/arm-beagle --target=arm-beagle $* || exit 1 20 | ./configure --build=$base/arm-at91x40 --target=arm-at91x40 $* || exit 1 21 | 22 | # configure i386 targets 23 | targets="$targets i386-pc i386-pc-tiny" 24 | ./configure --build=$base/i386-pc --target=i386-pc $* || exit 1 25 | ./configure --build=$base/i386-pc-tiny --target=i386-pc \ 26 | --profile=tiny $* || exit 1 27 | 28 | # create top level make file 29 | echo "# Autogenerated by allconfig" > $base/Makefile 30 | echo "SRCDIR = `pwd`" >> $base/Makefile 31 | echo "TARGETS = $targets" >> $base/Makefile 32 | cat >> $base/Makefile <<"MAKEFILE" 33 | 34 | ifdef MAKECMDGOALS 35 | $(MAKECMDGOALS): $(TARGETS) 36 | 37 | else 38 | all: $(TARGETS) 39 | 40 | endif 41 | 42 | .PHONY: $(TARGETS) 43 | $(TARGETS): 44 | $(MAKE) -C $@ $(MAKECMDGOALS) 45 | 46 | MAKEFILE 47 | -------------------------------------------------------------------------------- /boot/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= bootldr 2 | TYPE= BINARY 3 | SUBDIR= lib $(ARCH) common 4 | OBJS= ./$(ARCH)/$(PLATFORM)/boot.o ./common/common.o 5 | LIBS= ./lib/libboot.a 6 | LD_SCRIPT= ./$(ARCH)/$(ARCH)/boot.ld 7 | 8 | include $(SRCDIR)/mk/boot.mk 9 | -------------------------------------------------------------------------------- /boot/arm/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= $(PLATFORM) 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | -------------------------------------------------------------------------------- /boot/arm/arm/boot.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * Linker script for boot loader 3 | */ 4 | INCLUDE config.ld 5 | 6 | SECTIONS { 7 | . = LOADER_BASE ; 8 | 9 | .text . : { 10 | *(.start) 11 | *(.text) 12 | } 13 | .rodata . : { 14 | *(.rodata) 15 | } 16 | .data . : { 17 | *(.data) 18 | } 19 | .bss . : { 20 | *(.bss) 21 | *(COMMON) 22 | } 23 | . = LOADER_BASE + 0x1fff; 24 | .tail : { 25 | *(.tail) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /boot/arm/at91x40/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= boot.o 2 | TYPE= OBJECT 3 | VPATH := ../arm:$(VPATH) 4 | OBJS= head.o machdep.o elf_reloc.o 5 | 6 | include $(SRCDIR)/mk/boot.mk 7 | -------------------------------------------------------------------------------- /boot/arm/beagle/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= boot.o 2 | TYPE= OBJECT 3 | VPATH := ../arm:$(VPATH) 4 | OBJS= head.o machdep.o elf_reloc.o 5 | 6 | include $(SRCDIR)/mk/boot.mk 7 | -------------------------------------------------------------------------------- /boot/arm/gba/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= boot.o 2 | TYPE= OBJECT 3 | VPATH := ../arm:$(VPATH) 4 | OBJS= head.o machdep.o elf_reloc.o 5 | 6 | include $(SRCDIR)/mk/boot.mk 7 | -------------------------------------------------------------------------------- /boot/arm/integrator/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= boot.o 2 | TYPE= OBJECT 3 | VPATH := ../arm:$(VPATH) 4 | OBJS= head.o machdep.o elf_reloc.o 5 | 6 | include $(SRCDIR)/mk/boot.mk 7 | -------------------------------------------------------------------------------- /boot/common/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= common.o 2 | TYPE= OBJECT 3 | OBJS= main.o load.o elf.o debug.o 4 | 5 | include $(SRCDIR)/mk/boot.mk 6 | -------------------------------------------------------------------------------- /boot/i386/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= $(PLATFORM) utils 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | -------------------------------------------------------------------------------- /boot/i386/i386/boot.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * Linker script for boot loader 3 | */ 4 | INCLUDE config.ld 5 | 6 | SECTIONS { 7 | . = LOADER_BASE ; 8 | 9 | .text . : { 10 | *(.start) 11 | *(.text) 12 | } 13 | .rodata . : { 14 | *(.rodata) 15 | } 16 | .data . : { 17 | *(.data) 18 | } 19 | .bss . : { 20 | *(.bss) 21 | *(COMMON) 22 | } 23 | . = LOADER_BASE + 0x1fff; 24 | .tail : { 25 | *(.tail) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /boot/i386/pc/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= boot.o 2 | TYPE= OBJECT 3 | VPATH := ../i386:$(VPATH) 4 | OBJS= head.o machdep.o elf_reloc.o 5 | 6 | include $(SRCDIR)/mk/boot.mk 7 | -------------------------------------------------------------------------------- /boot/i386/utils/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= bootsect mkboot 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | -------------------------------------------------------------------------------- /boot/i386/utils/bootsect/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= bootsect.bin 2 | TYPE= BINARY 3 | OBJS= bootsect.o 4 | LD_SCRIPT= bootsect.ld 5 | OBJCOPYFLAGS+= -I elf32-i386 -O binary -R .note -R .comment -S 6 | 7 | include $(SRCDIR)/mk/boot.mk 8 | -------------------------------------------------------------------------------- /boot/i386/utils/bootsect/bootsect.ld: -------------------------------------------------------------------------------- 1 | ENTRY(_boot) 2 | SECTIONS { 3 | . = 0x7C00; 4 | .text . : { 5 | *(.text) 6 | __etext = . ; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /boot/i386/utils/mkboot/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= mkboot.com 2 | TYPE= BINARY 3 | OBJS= mkboot.o 4 | LD_SCRIPT= mkboot.ld 5 | OBJCOPYFLAGS+= -I elf32-i386 -O binary -R .note -R .comment -S 6 | 7 | include $(SRCDIR)/mk/boot.mk 8 | -------------------------------------------------------------------------------- /boot/i386/utils/mkboot/mkboot.ld: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x100; 3 | .text . : { 4 | *(.text) 5 | __etext = . ; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /boot/lib/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= libboot.a 2 | TYPE= LIBRARY 3 | OBJS= stdlib.o string.o 4 | 5 | include $(SRCDIR)/mk/boot.mk 6 | -------------------------------------------------------------------------------- /conf/etc/config.cmdbox: -------------------------------------------------------------------------------- 1 | # 2 | # CmdBox configuration file 3 | # 4 | options CMDBOX 5 | #options CMD_CAL 6 | options CMD_CAT 7 | options CMD_CLEAR 8 | options CMD_CP 9 | options CMD_DATE 10 | options CMD_DMESG 11 | options CMD_ECHO 12 | options CMD_FREE 13 | options CMD_HEAD 14 | options CMD_HOSTNAME 15 | options CMD_KILL 16 | options CMD_LS 17 | options CMD_MKDIR 18 | options CMD_MKFIFO 19 | options CMD_MOUNT 20 | options CMD_MV 21 | options CMD_NICE 22 | options CMD_PS 23 | options CMD_PWD 24 | options CMD_REBOOT 25 | options CMD_RM 26 | options CMD_RMDIR 27 | options CMD_SH 28 | options CMD_SHUTDOWN 29 | options CMD_SLEEP 30 | options CMD_SYNC 31 | options CMD_TEST 32 | options CMD_TOUCH 33 | options CMD_UMOUNT 34 | options CMD_UNAME 35 | -------------------------------------------------------------------------------- /dev/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= dev.o 2 | TYPE= DRIVER 3 | SUBDIR= $(ARCH) core gen power 4 | OBJS= ./$(ARCH)/$(PLATFORM)/dev.o \ 5 | ./core/core.o ./gen/gen.o ./power/power.o 6 | 7 | LD_SCRIPT= ./$(ARCH)/$(ARCH)/dev.ld 8 | 9 | #MAP = dev.map 10 | #DISASM= dev.lst 11 | #SYMBOL= dev.sym 12 | 13 | include $(SRCDIR)/mk/dev.mk 14 | -------------------------------------------------------------------------------- /dev/arm/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= $(PLATFORM) 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | -------------------------------------------------------------------------------- /dev/arm/arm/dev.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * Linker script for driver 3 | */ 4 | INCLUDE config.ld 5 | OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") 6 | OUTPUT_ARCH(arm) 7 | ENTRY(driver_main) 8 | PHDRS 9 | { 10 | text PT_LOAD FILEHDR PHDRS; 11 | data PT_LOAD; 12 | } 13 | SECTIONS 14 | { 15 | . = DRIVER_BASE + SIZEOF_HEADERS ; 16 | 17 | .text : { 18 | *(.text) 19 | *(.glue_7) 20 | *(.glue_7t) 21 | } : text = 0xff 22 | 23 | . = ALIGN(4); 24 | 25 | .rodata : { 26 | *(.rodata) 27 | *(.rodata.*) 28 | } : text 29 | 30 | .driver_table : { 31 | __driver_table = . ; 32 | *(.driver_table) 33 | __driver_table_end = . ; 34 | } : text 35 | 36 | .kstrtab : { 37 | *(.kstrtab) 38 | } : text 39 | 40 | .ksymtab ALIGN(4) : { 41 | *(.ksymtab) 42 | } : text 43 | 44 | . = ALIGN(4); 45 | .data : { 46 | *(.data) 47 | } : data 48 | 49 | . = ALIGN(4); 50 | .bss . : { 51 | *(.bss) 52 | *(COMMON) 53 | } 54 | 55 | /DISCARD/ : { *(.comment .note) } 56 | } 57 | -------------------------------------------------------------------------------- /dev/arm/at91x40/Makefile: -------------------------------------------------------------------------------- 1 | include $(SRCDIR)/mk/own.mk 2 | 3 | TARGET= dev.o 4 | TYPE= OBJECT 5 | OBJS-y= pio.o 6 | 7 | OBJS-$(CONFIG_SERIAL)+= serial.o 8 | OBJS-$(CONFIG_WATCHDOG)+= wdt.o 9 | OBJS-$(CONFIG_LED)+= led.o 10 | 11 | include $(SRCDIR)/mk/dev.mk 12 | -------------------------------------------------------------------------------- /dev/arm/beagle/Makefile: -------------------------------------------------------------------------------- 1 | include $(SRCDIR)/mk/own.mk 2 | 3 | TARGET= dev.o 4 | TYPE= OBJECT 5 | 6 | OBJS-$(CONFIG_SERIAL)+= serial.o 7 | OBJS-$(CONFIG_RTC)+= rtc.o 8 | OBJS-$(CONFIG_MMC)+= mmc.o 9 | 10 | include $(SRCDIR)/mk/dev.mk 11 | -------------------------------------------------------------------------------- /dev/arm/gba/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= dev.o 2 | TYPE= OBJECT 3 | 4 | OBJS-$(CONFIG_CONSOLE)+= console.o 5 | OBJS-$(CONFIG_KEYPAD)+= keypad.o 6 | OBJS-$(CONFIG_KEYBOARD)+= swkbd.o 7 | 8 | include $(SRCDIR)/mk/dev.mk 9 | -------------------------------------------------------------------------------- /dev/arm/gba/keypad.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2008, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef _KEYPAD_H 31 | #define _KEYPAD_H 32 | 33 | extern void keypad_attach(void (*)(u_char)); 34 | 35 | #endif /* !_KEYPAD_H */ 36 | -------------------------------------------------------------------------------- /dev/arm/integrator/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= dev.o 2 | TYPE= OBJECT 3 | 4 | OBJS-$(CONFIG_SERIAL)+= serial.o 5 | OBJS-$(CONFIG_RTC)+= rtc.o 6 | 7 | include $(SRCDIR)/mk/dev.mk 8 | -------------------------------------------------------------------------------- /dev/core/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= core.o 2 | TYPE= OBJECT 3 | OBJS-m= main.o 4 | 5 | include $(SRCDIR)/mk/dev.mk 6 | -------------------------------------------------------------------------------- /dev/gen/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= gen.o 2 | TYPE= OBJECT 3 | OBJS-m= null.o zero.o 4 | 5 | OBJS-$(CONFIG_TTY)+= tty.o 6 | OBJS-$(CONFIG_RAMDISK)+= ramdisk.o 7 | 8 | include $(SRCDIR)/mk/dev.mk 9 | -------------------------------------------------------------------------------- /dev/i386/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= $(PLATFORM) 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | -------------------------------------------------------------------------------- /dev/i386/i386/dev.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * Linker script for driver 3 | */ 4 | INCLUDE config.ld 5 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") 6 | OUTPUT_ARCH(i386) 7 | ENTRY(driver_main) 8 | PHDRS 9 | { 10 | text PT_LOAD FILEHDR PHDRS; 11 | data PT_LOAD; 12 | } 13 | SECTIONS 14 | { 15 | . = DRIVER_BASE + SIZEOF_HEADERS ; 16 | 17 | .text : { 18 | *(.text) 19 | } : text = 0x9090 20 | 21 | . = ALIGN(32); 22 | .rodata : { 23 | *(.rodata) 24 | *(.rodata.*) 25 | } : text 26 | 27 | .driver_table : { 28 | __driver_table = . ; 29 | *(.driver_table) 30 | __driver_table_end = . ; 31 | } : text 32 | 33 | .kstrtab : { 34 | *(.kstrtab) 35 | } : text 36 | 37 | .ksymtab ALIGN(4) : { 38 | *(.ksymtab) 39 | } : text 40 | 41 | . = ALIGN(32); 42 | .data : { 43 | *(.data) 44 | } : data 45 | 46 | .bss . : { 47 | *(.bss) 48 | *(COMMON) 49 | } 50 | /DISCARD/ : { *(.comment .note) } 51 | } 52 | -------------------------------------------------------------------------------- /dev/i386/pc/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= dev.o 2 | TYPE= OBJECT 3 | VPATH:= ../i386:$(VPATH) 4 | OBJS-m= cpufunc.o dma.o 5 | 6 | ifdef CONFIG_CPUFREQ 7 | OBJS-$(CONFIG_PM)+= cpu.o 8 | endif 9 | OBJS-$(CONFIG_KEYBOARD)+= kbd.o 10 | OBJS-$(CONFIG_CONSOLE)+= console.o 11 | OBJS-$(CONFIG_FDD)+= fdd.o 12 | OBJS-$(CONFIG_MOUSE)+= mouse.o 13 | OBJS-$(CONFIG_RTC)+= rtc.o 14 | OBJS-$(CONFIG_SERIAL)+= serial.o 15 | 16 | include $(SRCDIR)/mk/dev.mk 17 | -------------------------------------------------------------------------------- /dev/power/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= power.o 2 | TYPE= OBJECT 3 | OBJS-$(CONFIG_PM)+= pm.o 4 | ifdef CONFIG_CPUFREQ 5 | OBJS-$(CONFIG_PM)+= cpufreq.o 6 | endif 7 | 8 | include $(SRCDIR)/mk/dev.mk 9 | -------------------------------------------------------------------------------- /doc/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2005-2008, Kohsuke Ohtani 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 3. Neither the name of the author nor the names of any co-contibutors 13 | may be used to endorse or promote products derived from this software 14 | without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /doc/html/doc/img/arch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/arch.gif -------------------------------------------------------------------------------- /doc/html/doc/img/checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/checkmark.png -------------------------------------------------------------------------------- /doc/html/doc/img/doc_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/doc_icon.gif -------------------------------------------------------------------------------- /doc/html/doc/img/emulate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/emulate.gif -------------------------------------------------------------------------------- /doc/html/doc/img/event.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/event.gif -------------------------------------------------------------------------------- /doc/html/doc/img/gbakbd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/gbakbd.png -------------------------------------------------------------------------------- /doc/html/doc/img/ipc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/ipc.gif -------------------------------------------------------------------------------- /doc/html/doc/img/ipcmap.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/ipcmap.gif -------------------------------------------------------------------------------- /doc/html/doc/img/irq.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/irq.gif -------------------------------------------------------------------------------- /doc/html/doc/img/kernel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/kernel.gif -------------------------------------------------------------------------------- /doc/html/doc/img/memmap.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/memmap.gif -------------------------------------------------------------------------------- /doc/html/doc/img/memory.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/memory.gif -------------------------------------------------------------------------------- /doc/html/doc/img/msg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/msg.gif -------------------------------------------------------------------------------- /doc/html/doc/img/overview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/overview.gif -------------------------------------------------------------------------------- /doc/html/doc/img/power.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/power.gif -------------------------------------------------------------------------------- /doc/html/doc/img/thread.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/thread.gif -------------------------------------------------------------------------------- /doc/html/doc/img/usbcable.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/img/usbcable.jpg -------------------------------------------------------------------------------- /doc/html/doc/prex_datasheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/doc/prex_datasheet.pdf -------------------------------------------------------------------------------- /doc/html/img/allow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/img/allow.png -------------------------------------------------------------------------------- /doc/html/img/background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/img/background.gif -------------------------------------------------------------------------------- /doc/html/img/bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/img/bg.gif -------------------------------------------------------------------------------- /doc/html/img/bullet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/img/bullet.gif -------------------------------------------------------------------------------- /doc/html/img/checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/img/checkmark.png -------------------------------------------------------------------------------- /doc/html/img/grad.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/img/grad.gif -------------------------------------------------------------------------------- /doc/html/img/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/img/logo.gif -------------------------------------------------------------------------------- /doc/html/img/menu_bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/img/menu_bottom.gif -------------------------------------------------------------------------------- /doc/html/img/menu_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndrewD/prex/c94c887116571afd285ba678de8ef38d21660742/doc/html/img/menu_top.gif -------------------------------------------------------------------------------- /include/arm/endian.h: -------------------------------------------------------------------------------- 1 | 2 | #define _BYTE_ORDER LITTLE_ENDIAN 3 | -------------------------------------------------------------------------------- /include/i386/endian.h: -------------------------------------------------------------------------------- 1 | 2 | #define _BYTE_ORDER LITTLE_ENDIAN 3 | -------------------------------------------------------------------------------- /include/machine/asm.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__arm__) 3 | #include "arm/asm.h" 4 | #elif defined (__i386__) 5 | #include "i386/asm.h" 6 | #elif defined (__ppc__) 7 | #include "ppc/asm.h" 8 | #elif defined (__mips__) 9 | #include "mips/asm.h" 10 | #elif defined (__sh4__) 11 | #include "sh4/asm.h" 12 | #else 13 | #error architecture not supported 14 | #endif 15 | -------------------------------------------------------------------------------- /include/machine/elf.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__arm__) 3 | #include "arm/elf.h" 4 | #elif defined (__i386__) 5 | #include "i386/elf.h" 6 | #elif defined (__ppc__) 7 | #include "ppc/elf.h" 8 | #elif defined (__mips__) 9 | #include "mips/elf.h" 10 | #elif defined (__sh4__) 11 | #include "sh4/elf.h" 12 | #else 13 | #error architecture not supported 14 | #endif 15 | -------------------------------------------------------------------------------- /include/machine/endian.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__arm__) 3 | #include "arm/endian.h" 4 | #elif defined (__i386__) 5 | #include "i386/endian.h" 6 | #elif defined (__ppc__) 7 | #include "ppc/endian.h" 8 | #elif defined (__mips__) 9 | #include "mips/endian.h" 10 | #elif defined (__sh4__) 11 | #include "sh4/endian.h" 12 | #else 13 | #error architecture not supported 14 | #endif 15 | -------------------------------------------------------------------------------- /include/machine/limits.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__arm__) 3 | #include "arm/limits.h" 4 | #elif defined (__i386__) 5 | #include "i386/limits.h" 6 | #elif defined (__ppc__) 7 | #include "ppc/limits.h" 8 | #elif defined (__mips__) 9 | #include "mips/limits.h" 10 | #elif defined (__sh4__) 11 | #include "sh4/limits.h" 12 | #else 13 | #error architecture not supported 14 | #endif 15 | -------------------------------------------------------------------------------- /include/machine/lock.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__arm__) 3 | #include "arm/lock.h" 4 | #elif defined (__i386__) 5 | #include "i386/lock.h" 6 | #elif defined (__ppc__) 7 | #include "ppc/lock.h" 8 | #elif defined (__mips__) 9 | #include "mips/lock.h" 10 | #elif defined (__sh4__) 11 | #include "sh4/lock.h" 12 | #else 13 | #error architecture not supported 14 | #endif 15 | -------------------------------------------------------------------------------- /include/machine/setjmp.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__arm__) 3 | #include "arm/setjmp.h" 4 | #elif defined (__i386__) 5 | #include "i386/setjmp.h" 6 | #elif defined (__ppc__) 7 | #include "ppc/setjmp.h" 8 | #elif defined (__mips__) 9 | #include "mips/setjmp.h" 10 | #elif defined (__sh4__) 11 | #include "sh4/setjmp.h" 12 | #else 13 | #error architecture not supported 14 | #endif 15 | -------------------------------------------------------------------------------- /include/machine/signal.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__arm__) 3 | #include "arm/signal.h" 4 | #elif defined (__i386__) 5 | #include "i386/signal.h" 6 | #elif defined (__ppc__) 7 | #include "ppc/signal.h" 8 | #elif defined (__mips__) 9 | #include "mips/signal.h" 10 | #elif defined (__sh4__) 11 | #include "sh4/signal.h" 12 | #else 13 | #error architecture not supported 14 | #endif 15 | -------------------------------------------------------------------------------- /include/machine/stdarg.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__arm__) 3 | #include "arm/stdarg.h" 4 | #elif defined (__i386__) 5 | #include "i386/stdarg.h" 6 | #elif defined (__ppc__) 7 | #include "ppc/stdarg.h" 8 | #elif defined (__mips__) 9 | #include "mips/stdarg.h" 10 | #elif defined (__sh4__) 11 | #include "sh4/stdarg.h" 12 | #else 13 | #error architecture not supported 14 | #endif 15 | -------------------------------------------------------------------------------- /include/machine/systrap.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__arm__) 3 | #include "arm/systrap.h" 4 | #elif defined (__i386__) 5 | #include "i386/systrap.h" 6 | #elif defined (__ppc__) 7 | #include "ppc/systrap.h" 8 | #elif defined (__mips__) 9 | #include "mips/systrap.h" 10 | #elif defined (__sh4__) 11 | #include "sh4/systrap.h" 12 | #else 13 | #error architecture not supported 14 | #endif 15 | -------------------------------------------------------------------------------- /include/machine/types.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__arm__) 3 | #include "arm/types.h" 4 | #elif defined (__i386__) 5 | #include "i386/types.h" 6 | #elif defined (__ppc__) 7 | #include "ppc/types.h" 8 | #elif defined (__mips__) 9 | #include "mips/types.h" 10 | #elif defined (__sh4__) 11 | #include "sh4/types.h" 12 | #else 13 | #error architecture not supported 14 | #endif 15 | -------------------------------------------------------------------------------- /include/stdint.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /mk/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= ../prexos 2 | TYPE= OS_IMAGE 3 | LOADER= $(BUILDDIR)/boot/bootldr 4 | KERNEL= $(BUILDDIR)/sys/prex 5 | 6 | include $(SRCDIR)/mk/Makefile.inc 7 | -------------------------------------------------------------------------------- /mk/boot.mk: -------------------------------------------------------------------------------- 1 | INCLUDE+= -I$(BUILDDIR) -I$(SRCDIR) -I$(SRCDIR)/boot/$(ARCH)/include \ 2 | -I$(SRCDIR)/boot/include -I$(SRCDIR)/include 3 | 4 | ASFLAGS+= $(INCLUDE) 5 | CFLAGS+= $(INCLUDE) -D__KERNEL_ -D__BOOT__ -nostdinc -fno-builtin 6 | CPPFLAGS+= $(INCLUDE) -D__KERNEL_ -D__BOOT__ 7 | LDFLAGS+= -static -nostdlib -L$(BUILDDIR)/conf 8 | LINTFLAGS+= -D__KERNEL_ -D__BOOT__ 9 | 10 | -include $(SRCDIR)/boot/$(ARCH)/$(PLATFORM)/boot.mk 11 | include $(SRCDIR)/mk/Makefile.inc 12 | -------------------------------------------------------------------------------- /mk/dev.mk: -------------------------------------------------------------------------------- 1 | INCLUDE= -I$(BUILDDIR) -I$(SRCDIR) -I$(SRCDIR)/dev/$(ARCH)/include \ 2 | -I$(BUILDDIR)/dev/$(ARCH)/$(PLATFORM) \ 3 | -I$(SRCDIR)/dev/include -I$(SRCDIR)/include 4 | 5 | ASFLAGS+= $(INCLUDE) 6 | CFLAGS+= $(INCLUDE) -nostdinc -fno-builtin -D__KERNEL__ -D__DRIVER__ 7 | CPPFLAGS+= $(INCLUDE) -D__KERNEL__ -D__DRIVER__ 8 | LDFLAGS+= -static -nostdlib -L$(BUILDDIR)/conf 9 | LINTFLAGS+= -D__KERNEL__ -D__DRIVER__ 10 | 11 | ifeq ($(DRIVER_BASE),AUTODETECT) 12 | LDFLAGS+= -r 13 | endif 14 | 15 | -include $(SRCDIR)/dev/$(ARCH)/$(PLATFORM)/dev.mk 16 | include $(SRCDIR)/mk/Makefile.inc 17 | -------------------------------------------------------------------------------- /mk/lib.mk: -------------------------------------------------------------------------------- 1 | INCLUDE= -I$(BUILDDIR) -I$(SRCDIR) -I$(SRCDIR)/usr/include -I$(SRCDIR)/include 2 | 3 | ASFLAGS+= $(INCLUDE) 4 | CFLAGS+= $(INCLUDE) -nostdinc 5 | CPPFLAGS+= $(INCLUDE) -nostdinc 6 | LDFLAGS+= -static $(USR_LDFLAGS) 7 | 8 | TYPE= LIBRARY 9 | 10 | ifdef LIB 11 | TARGET ?= $(LIB) 12 | endif 13 | 14 | ifdef SRCS 15 | OBJS+= $(SRCS:.c=.o) 16 | endif 17 | 18 | include $(SRCDIR)/mk/Makefile.inc 19 | -------------------------------------------------------------------------------- /mk/obj.mk: -------------------------------------------------------------------------------- 1 | INCLUDE= -I$(BUILDDIR) -I$(SRCDIR) -I$(SRCDIR)/include -I$(SRCDIR)/usr/include 2 | 3 | ASFLAGS+= $(INCLUDE) 4 | CFLAGS+= $(INCLUDE) -nostdinc 5 | CPPFLAGS+= $(INCLUDE) -nostdinc 6 | LDFLAGS+= -static $(USR_LDFLAGS) 7 | 8 | TYPE= OBJECT 9 | 10 | ifdef SRCS 11 | OBJS+= $(SRCS:.c=.o) 12 | endif 13 | 14 | include $(SRCDIR)/mk/Makefile.inc 15 | -------------------------------------------------------------------------------- /mk/own.mk: -------------------------------------------------------------------------------- 1 | ifndef _OWN_MK_ 2 | _OWN_MK_=1 3 | 4 | include $(BUILDDIR)/conf/config.mk 5 | 6 | ifndef SRCDIR 7 | @echo "Error: Please run configure at the top of source tree" 8 | exit 1 9 | endif 10 | 11 | endif 12 | -------------------------------------------------------------------------------- /mk/prog.mk: -------------------------------------------------------------------------------- 1 | INCLUDE= -I$(BUILDDIR) -I$(SRCDIR) -I$(SRCDIR)/include -I$(SRCDIR)/usr/include 2 | 3 | ASFLAGS+= $(INCLUDE) 4 | CFLAGS+= $(INCLUDE) -nostdinc 5 | CPPFLAGS+= $(INCLUDE) -nostdinc 6 | LDFLAGS+= -static $(USR_LDFLAGS) -L$(BUILDDIR)/usr/lib 7 | 8 | LIBC= $(BUILDDIR)/usr/lib/libc.a 9 | CRT0= $(BUILDDIR)/usr/lib/crt0.o 10 | TYPE= EXEC 11 | 12 | ifeq ($(CONFIG_MMU), y) 13 | LD_SCRIPT= $(SRCDIR)/usr/arch/$(ARCH)/user.ld 14 | else 15 | LD_SCRIPT= $(SRCDIR)/usr/arch/$(ARCH)/user-nommu.ld 16 | LDFLAGS+= --relocatable -d 17 | endif 18 | 19 | ifdef PROG 20 | TARGET ?= $(PROG) 21 | endif 22 | 23 | ifndef OBJS 24 | ifdef SRCS 25 | OBJS= $(SRCS:.c=.o) 26 | else 27 | OBJS= $(TARGET).o 28 | endif 29 | endif 30 | 31 | include $(SRCDIR)/mk/Makefile.inc 32 | -------------------------------------------------------------------------------- /mk/subdir.mk: -------------------------------------------------------------------------------- 1 | include $(SRCDIR)/mk/Makefile.inc 2 | -------------------------------------------------------------------------------- /mk/sys.mk: -------------------------------------------------------------------------------- 1 | INCLUDE= -I$(BUILDDIR) -I$(SRCDIR) -I$(BUILDDIR)/sys/arch/$(ARCH)/include \ 2 | -I$(SRCDIR)/sys/arch/$(ARCH)/include \ 3 | -I$(SRCDIR)/sys/include -I$(SRCDIR)/include 4 | 5 | ASFLAGS+= $(INCLUDE) 6 | CFLAGS+= $(INCLUDE) -nostdinc -fno-builtin -D__KERNEL__ 7 | CPPFLAGS+= $(INCLUDE) -D__KERNEL__ 8 | LDFLAGS+= -static -nostdlib -L$(BUILDDIR)/conf 9 | LINTFLAGS+= -D__KERNEL__ 10 | 11 | -include $(SRCDIR)/sys/arch/$(ARCH)/$(PLATFORM)/sys.mk 12 | include $(SRCDIR)/mk/Makefile.inc 13 | -------------------------------------------------------------------------------- /mk/task.mk: -------------------------------------------------------------------------------- 1 | INCLUDE= -I$(BUILDDIR) -I$(SRCDIR) -I$(SRCDIR)/include -I$(SRCDIR)/usr/include 2 | 3 | ASFLAGS+= $(INCLUDE) 4 | CFLAGS+= $(INCLUDE) -nostdinc -D_STANDALONE 5 | CPPFLAGS+= $(INCLUDE) -nostdinc -D_STANDALONE 6 | LDFLAGS+= -static $(USR_LDFLAGS) 7 | 8 | LIBC= $(BUILDDIR)/usr/lib/libsa.a 9 | CRT0= $(BUILDDIR)/usr/lib/crt0.o 10 | TYPE= EXEC 11 | 12 | ifeq ($(CONFIG_MMU), y) 13 | LD_SCRIPT= $(SRCDIR)/usr/arch/$(ARCH)/user.ld 14 | else 15 | LD_SCRIPT= $(SRCDIR)/usr/arch/$(ARCH)/user-nommu.ld 16 | LDFLAGS+= --relocatable -d 17 | endif 18 | 19 | ifdef TASK 20 | TARGET ?= $(TASK) 21 | endif 22 | 23 | ifndef OBJS 24 | ifdef SRCS 25 | OBJS= $(SRCS:.c=.o) 26 | else 27 | OBJS= $(TARGET).o 28 | endif 29 | endif 30 | 31 | include $(SRCDIR)/mk/Makefile.inc 32 | -------------------------------------------------------------------------------- /sys/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= prex 2 | TYPE= KERNEL 3 | SUBDIR= lib arch kern mem ipc sync 4 | OBJS= ./arch/$(ARCH)/$(PLATFORM)/platform.o \ 5 | ./kern/kern.o ./mem/mem.o ./ipc/ipc.o ./sync/sync.o ../dev/dev.o 6 | LIBS+= ./lib/libkern.a 7 | LD_SCRIPT= ./arch/$(ARCH)/$(ARCH)/kernel.ld 8 | 9 | #MAP= prex.map 10 | #DISASM= prex.lst 11 | 12 | include $(SRCDIR)/mk/sys.mk 13 | -------------------------------------------------------------------------------- /sys/arch/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= $(ARCH) 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | -------------------------------------------------------------------------------- /sys/arch/arm/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= $(PLATFORM) 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | -------------------------------------------------------------------------------- /sys/arch/arm/arm/kernel.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * Linker script for kernel 3 | */ 4 | 5 | INCLUDE config.ld 6 | 7 | /* 8 | * We use ELF as an output format. So that we can 9 | * debug the code in some form. 10 | */ 11 | OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") 12 | OUTPUT_ARCH(arm) 13 | 14 | ENTRY(kernel_start) 15 | 16 | PHDRS 17 | { 18 | text PT_LOAD FILEHDR PHDRS; 19 | data PT_LOAD; 20 | } 21 | 22 | SECTIONS 23 | { 24 | . = KERNEL_BASE + SIZEOF_HEADERS; 25 | 26 | .text : { 27 | *(.text) 28 | *(.glue_7) 29 | *(.glue_7t) 30 | } : text = 0xff 31 | 32 | . = ALIGN(4); 33 | .rodata : { 34 | *(.rodata) 35 | *(.rodata.*) 36 | } : text 37 | 38 | .kstrtab : { 39 | *(.kstrtab) 40 | } : text 41 | 42 | .ksymtab ALIGN(4) : { 43 | *(.ksymtab) 44 | } : text 45 | 46 | .driver_table ALIGN(4) : { 47 | __driver_table = . ; 48 | *(.driver_table) 49 | __driver_table_end = . ; 50 | } : text 51 | 52 | .data ALIGN(4) : { 53 | *(.data) 54 | } : data = 0xff 55 | 56 | . = ALIGN(4); 57 | __bss = . ; 58 | .bss . : { 59 | *(.bss) 60 | *(COMMON) 61 | } 62 | . = ALIGN(4); 63 | __end = . ; 64 | 65 | /DISCARD/ : { *(.comment .note) } 66 | } 67 | -------------------------------------------------------------------------------- /sys/arch/arm/at91x40/Makefile: -------------------------------------------------------------------------------- 1 | include $(SRCDIR)/mk/own.mk 2 | 3 | TARGET= platform.o 4 | TYPE= OBJECT 5 | VPATH := ../arm:$(VPATH) 6 | OBJS= locore.o cpufunc.o interrupt.o \ 7 | context.o trap.o \ 8 | cpu.o machdep.o clock.o diag.o 9 | 10 | include $(SRCDIR)/mk/sys.mk 11 | -------------------------------------------------------------------------------- /sys/arch/arm/beagle/Makefile: -------------------------------------------------------------------------------- 1 | include $(SRCDIR)/mk/own.mk 2 | 3 | TARGET= platform.o 4 | TYPE= OBJECT 5 | VPATH := ../arm:$(VPATH) 6 | OBJS= locore.o cpufunc.o interrupt.o \ 7 | context.o trap.o \ 8 | cpu.o machdep.o clock.o diag.o 9 | 10 | ifeq ($(CONFIG_MMU),y) 11 | OBJS+= mmu.o 12 | endif 13 | 14 | include $(SRCDIR)/mk/sys.mk 15 | -------------------------------------------------------------------------------- /sys/arch/arm/gba/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= platform.o 2 | TYPE= OBJECT 3 | VPATH:= ../arm:$(VPATH) 4 | OBJS= locore.o locore_gba.o cpufunc.o \ 5 | interrupt.o context.o trap.o cpu.o \ 6 | machdep.o clock.o diag.o 7 | 8 | include $(SRCDIR)/mk/sys.mk 9 | -------------------------------------------------------------------------------- /sys/arch/arm/include/platform.h: -------------------------------------------------------------------------------- 1 | #if defined(__gba__) 2 | #include "../gba/platform.h" 3 | #elif defined(__integrator__) 4 | #include "../integrator/platform.h" 5 | #elif defined(__beagle__) 6 | #include "../beagle/platform.h" 7 | #elif defined(__at91x40__) 8 | #include "../at91x40/platform.h" 9 | #else 10 | #error platform not supported 11 | #endif 12 | -------------------------------------------------------------------------------- /sys/arch/arm/integrator/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= platform.o 2 | TYPE= OBJECT 3 | VPATH:= ../arm:$(VPATH) 4 | OBJS= locore.o cpufunc.o interrupt.o \ 5 | context.o trap.o \ 6 | cpu.o machdep.o clock.o diag.o 7 | 8 | ifeq ($(CONFIG_MMU),y) 9 | OBJS+= mmu.o 10 | endif 11 | 12 | include $(SRCDIR)/mk/sys.mk 13 | -------------------------------------------------------------------------------- /sys/arch/i386/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= $(PLATFORM) 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | -------------------------------------------------------------------------------- /sys/arch/i386/i386/kernel.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * Linker script for kernel 3 | */ 4 | 5 | INCLUDE config.ld 6 | 7 | /* 8 | * We use ELF as an output format. So that we can 9 | * debug the code in some form. 10 | */ 11 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") 12 | OUTPUT_ARCH(i386) 13 | 14 | ENTRY(kernel_start) 15 | 16 | PHDRS 17 | { 18 | text PT_LOAD FILEHDR PHDRS; 19 | data PT_LOAD; 20 | } 21 | 22 | SECTIONS 23 | { 24 | . = KERNEL_BASE + SIZEOF_HEADERS; 25 | 26 | .text : { 27 | *(.text) 28 | } : text = 0x9090 29 | 30 | . = ALIGN(32); 31 | .rodata : { 32 | *(.rodata) 33 | *(.rodata.*) 34 | } : text 35 | 36 | .kstrtab : { 37 | *(.kstrtab) 38 | } : text 39 | 40 | .ksymtab ALIGN(4) : { 41 | *(.ksymtab) 42 | } : text 43 | 44 | .driver_table ALIGN(4) : { 45 | __driver_table = . ; 46 | *(.driver_table) 47 | __driver_table_end = . ; 48 | } : text 49 | 50 | . = ALIGN(32); 51 | .data : { 52 | *(.data) 53 | } : data 54 | 55 | __bss = .; 56 | .bss . : { 57 | *(.bss) 58 | *(COMMON) 59 | } 60 | . = ALIGN(32 / 8); 61 | __end = .; 62 | 63 | /DISCARD/ : { *(.comment .note) } 64 | } 65 | -------------------------------------------------------------------------------- /sys/arch/i386/include/platform.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __pc__ 3 | #include "../pc/platform.h" 4 | #else 5 | #error platform not supported 6 | #endif 7 | 8 | -------------------------------------------------------------------------------- /sys/arch/i386/pc/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= platform.o 2 | TYPE= OBJECT 3 | VPATH := ../i386:$(VPATH) 4 | OBJS= locore.o \ 5 | cpufunc.o \ 6 | cpu.o \ 7 | trap.o \ 8 | context.o \ 9 | interrupt.o \ 10 | clock.o \ 11 | diag.o \ 12 | machdep.o 13 | 14 | ifeq ($(CONFIG_MMU),y) 15 | OBJS+= mmu.o 16 | endif 17 | 18 | include $(SRCDIR)/mk/sys.mk 19 | -------------------------------------------------------------------------------- /sys/ipc/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= ipc.o 2 | TYPE= OBJECT 3 | OBJS= object.o msg.o 4 | 5 | include $(SRCDIR)/mk/sys.mk 6 | -------------------------------------------------------------------------------- /sys/kern/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= kern.o 2 | TYPE= OBJECT 3 | OBJS= main.o sched.o thread.o task.o syscalls.o timer.o irq.o \ 4 | device.o exception.o system.o debug.o dki.o 5 | 6 | include $(SRCDIR)/mk/sys.mk 7 | -------------------------------------------------------------------------------- /sys/lib/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= libkern.a 2 | TYPE= LIBRARY 3 | OBJS= queue.o vsprintf.o sprintf.o atol.o \ 4 | htonl.o htons.o ntohl.o ntohs.o \ 5 | strncpy.o strlcpy.o strncmp.o strnlen.o memcpy.o memset.o 6 | OBJS-$(CONFIG_DELAY)+= delay.o 7 | 8 | include $(SRCDIR)/mk/sys.mk 9 | -------------------------------------------------------------------------------- /sys/lib/htonl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Written by J.T. Conklin . 3 | * Public domain. 4 | */ 5 | 6 | #include 7 | 8 | #undef htonl 9 | 10 | uint32_t 11 | htonl(x) 12 | uint32_t x; 13 | { 14 | #if BYTE_ORDER == LITTLE_ENDIAN 15 | u_char *s = (u_char *)&x; 16 | return (uint32_t)(s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]); 17 | #else 18 | return x; 19 | #endif 20 | } 21 | -------------------------------------------------------------------------------- /sys/lib/htons.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Written by J.T. Conklin . 3 | * Public domain. 4 | */ 5 | 6 | #include 7 | 8 | #undef htons 9 | 10 | uint16_t 11 | htons(uint16_t x) 12 | { 13 | #if BYTE_ORDER == LITTLE_ENDIAN 14 | u_char *s = (u_char *) &x; 15 | return (uint16_t)(s[0] << 8 | s[1]); 16 | #else 17 | return x; 18 | #endif 19 | } 20 | -------------------------------------------------------------------------------- /sys/lib/ntohl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Written by J.T. Conklin . 3 | * Public domain. 4 | */ 5 | 6 | #include 7 | 8 | #undef ntohl 9 | 10 | uint32_t 11 | ntohl(x) 12 | uint32_t x; 13 | { 14 | #if BYTE_ORDER == LITTLE_ENDIAN 15 | u_char *s = (u_char *)&x; 16 | return (uint32_t)(s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]); 17 | #else 18 | return x; 19 | #endif 20 | } 21 | -------------------------------------------------------------------------------- /sys/lib/ntohs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Written by J.T. Conklin . 3 | * Public domain. 4 | */ 5 | 6 | #include 7 | 8 | #undef ntohs 9 | 10 | uint16_t 11 | ntohs(uint16_t x) 12 | { 13 | #if BYTE_ORDER == LITTLE_ENDIAN 14 | u_char *s = (u_char *) &x; 15 | return (uint16_t)(s[0] << 8 | s[1]); 16 | #else 17 | return x; 18 | #endif 19 | } 20 | -------------------------------------------------------------------------------- /sys/mem/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= mem.o 2 | TYPE= OBJECT 3 | OBJS= page.o kmem.o 4 | OBJS-$(CONFIG_KMEM_PROTECT)+= kpage.o 5 | 6 | ifeq ($(CONFIG_MMU),y) 7 | OBJS+= vm.o 8 | else 9 | OBJS+= vm_nommu.o 10 | endif 11 | 12 | include $(SRCDIR)/mk/sys.mk 13 | -------------------------------------------------------------------------------- /sys/sync/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= sync.o 2 | TYPE= OBJECT 3 | OBJS= mutex.o sem.o cond.o 4 | 5 | include $(SRCDIR)/mk/sys.mk 6 | -------------------------------------------------------------------------------- /usr/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= lib server bin sample test 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | 5 | # parallel make: ensure lib built first 6 | $(filter-out lib,$(SUBDIR)): lib 7 | -------------------------------------------------------------------------------- /usr/arch/arm/_systrap.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | -------------------------------------------------------------------------------- /usr/arch/arm/user-nommu.ld: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") 2 | OUTPUT_ARCH(arm) 3 | ENTRY(_start) 4 | PHDRS 5 | { 6 | text PT_LOAD FILEHDR PHDRS; 7 | data PT_LOAD; 8 | } 9 | SECTIONS 10 | { 11 | . = SIZEOF_HEADERS; 12 | 13 | .text : { 14 | *(.text) 15 | *(.glue_7) 16 | *(.glue_7t) 17 | } : text = 0xff 18 | 19 | . = ALIGN(4); 20 | .rodata : { 21 | *(.rodata) 22 | *(.rodata.*) 23 | } : text 24 | 25 | . = ALIGN(4); 26 | .data : { 27 | *(.data) 28 | } : data 29 | 30 | . = ALIGN(4); 31 | .bss . : { 32 | *(.bss) 33 | *(COMMON) 34 | } 35 | 36 | /DISCARD/ : { *(.comment .note) } 37 | } 38 | -------------------------------------------------------------------------------- /usr/arch/arm/user.ld: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") 2 | OUTPUT_ARCH(arm) 3 | ENTRY(_start) 4 | PHDRS 5 | { 6 | text PT_LOAD FILEHDR PHDRS; 7 | data PT_LOAD; 8 | } 9 | SECTIONS 10 | { 11 | . = 0x10000 + SIZEOF_HEADERS; 12 | 13 | .text : { 14 | *(.text) 15 | *(.glue_7) 16 | *(.glue_7t) 17 | } : text = 0xff 18 | 19 | . = ALIGN(4); 20 | .rodata : { 21 | *(.rodata) 22 | *(.rodata.*) 23 | } : text 24 | 25 | . = ALIGN(0x1000); 26 | .data : { 27 | *(.data) 28 | } : data 29 | 30 | . = ALIGN(4); 31 | .bss . : { 32 | *(.bss) 33 | *(COMMON) 34 | } 35 | 36 | /DISCARD/ : { *(.comment .note) } 37 | } 38 | -------------------------------------------------------------------------------- /usr/arch/i386/user-nommu.ld: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") 2 | OUTPUT_ARCH(i386) 3 | ENTRY(_start) 4 | SECTIONS 5 | { 6 | . = SIZEOF_HEADERS ; 7 | 8 | .text : { 9 | *(.text) 10 | } = 0x9090 11 | 12 | . = ALIGN(32); 13 | .rodata : { 14 | *(.rodata) 15 | *(.rodata.*) 16 | } 17 | 18 | . = ALIGN(32); 19 | .data : { 20 | *(.data) 21 | } 22 | 23 | .bss . : { 24 | *(.bss) 25 | *(COMMON) 26 | } 27 | 28 | /DISCARD/ : { 29 | *(.comment .note .eh_frame) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /usr/arch/i386/user.ld: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") 2 | OUTPUT_ARCH(i386) 3 | ENTRY(_start) 4 | SECTIONS 5 | { 6 | . = 0x10000 + SIZEOF_HEADERS ; 7 | 8 | .text : { 9 | *(.text) 10 | } = 0x9090 11 | 12 | . = ALIGN(32); 13 | 14 | .rodata : { 15 | *(.rodata) 16 | *(.rodata.*) 17 | } 18 | 19 | . = ALIGN (0x1000); 20 | .data : { 21 | *(.data) 22 | } 23 | 24 | .bss . : { 25 | *(.bss) 26 | *(COMMON) 27 | } 28 | 29 | /DISCARD/ : { *(.comment .note) } 30 | } 31 | -------------------------------------------------------------------------------- /usr/bin/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= init 2 | 3 | ifeq ($(CONFIG_CMDBOX),y) 4 | # Pack commands in cmdbox 5 | SUBDIR+= cmdbox 6 | else 7 | # Build all commands 8 | SUBDIR-$(CONFIG_CMD_CAL)+= cal 9 | SUBDIR-$(CONFIG_CMD_CAT)+= cat 10 | SUBDIR-$(CONFIG_CMD_CLEAR)+= clear 11 | SUBDIR-$(CONFIG_CMD_CP)+= cp 12 | SUBDIR-$(CONFIG_CMD_DATE)+= date 13 | SUBDIR-$(CONFIG_CMD_DMESG)+= dmesg 14 | SUBDIR-$(CONFIG_CMD_ECHO)+= echo 15 | SUBDIR-$(CONFIG_CMD_FREE)+= free 16 | SUBDIR-$(CONFIG_CMD_HEAD)+= head 17 | SUBDIR-$(CONFIG_CMD_HOSTNAME)+= hostname 18 | SUBDIR-$(CONFIG_CMD_KILL)+= kill 19 | SUBDIR-$(CONFIG_CMD_LS)+= ls 20 | SUBDIR-$(CONFIG_CMD_MKDIR)+= mkdir 21 | SUBDIR-$(CONFIG_CMD_MKFIFO)+= mkfifo 22 | SUBDIR-$(CONFIG_CMD_MOUNT)+= mount 23 | SUBDIR-$(CONFIG_CMD_MV)+= mv 24 | SUBDIR-$(CONFIG_CMD_NICE)+= nice 25 | SUBDIR-$(CONFIG_CMD_PS)+= ps 26 | SUBDIR-$(CONFIG_CMD_PWD)+= pwd 27 | SUBDIR-$(CONFIG_CMD_REBOOT)+= reboot 28 | SUBDIR-$(CONFIG_CMD_RM)+= rm 29 | SUBDIR-$(CONFIG_CMD_RMDIR)+= rmdir 30 | SUBDIR-$(CONFIG_CMD_SHUTDOWN)+= shutdown 31 | SUBDIR-$(CONFIG_CMD_SLEEP)+= sleep 32 | SUBDIR-$(CONFIG_CMD_SYNC)+= sync 33 | SUBDIR-$(CONFIG_CMD_TEST)+= test 34 | SUBDIR-$(CONFIG_CMD_TOUCH)+= touch 35 | SUBDIR-$(CONFIG_CMD_UMOUNT)+= umount 36 | SUBDIR-$(CONFIG_CMD_UNAME)+= uname 37 | SUBDIR-$(CONFIG_CMD_SH)+= sh 38 | 39 | SUBDIR+= $(SUBDIR-y) 40 | endif 41 | 42 | include $(SRCDIR)/mk/subdir.mk 43 | -------------------------------------------------------------------------------- /usr/bin/cal/Makefile: -------------------------------------------------------------------------------- 1 | PROG= cal 2 | include $(SRCDIR)/mk/prog.mk 3 | -------------------------------------------------------------------------------- /usr/bin/cat/Makefile: -------------------------------------------------------------------------------- 1 | PROG= cat 2 | include $(SRCDIR)/mk/prog.mk 3 | -------------------------------------------------------------------------------- /usr/bin/clear/Makefile: -------------------------------------------------------------------------------- 1 | PROG= clear 2 | include $(SRCDIR)/mk/prog.mk 3 | -------------------------------------------------------------------------------- /usr/bin/cmdbox/Makefile: -------------------------------------------------------------------------------- 1 | PROG= cmdbox 2 | SRCS= main.c cmd_conf.c 3 | CFLAGS+= -DCMDBOX 4 | 5 | VPATH := ../cal:../cat:../clear:../cp:../date:../dmesg:../echo:\ 6 | ../free:../head:../hostname:../kill:../ls:../mkdir:../mkfifo:\ 7 | ../mount:../mv:../nice:../ps:../pwd:../reboot:../rm:\ 8 | ../rmdir:../shutdown:../sleep:../sync:../test:../touch:\ 9 | ../umount:../uname:../sh:$(VPATH) 10 | 11 | SRCS-$(CONFIG_CMD_CAL)+= cal.c 12 | SRCS-$(CONFIG_CMD_CAT)+= cat.c 13 | SRCS-$(CONFIG_CMD_CLEAR)+= clear.c 14 | SRCS-$(CONFIG_CMD_CP)+= cp.c 15 | SRCS-$(CONFIG_CMD_DATE)+= date.c 16 | SRCS-$(CONFIG_CMD_DMESG)+= dmesg.c 17 | SRCS-$(CONFIG_CMD_ECHO)+= echo.c 18 | SRCS-$(CONFIG_CMD_FREE)+= free.c 19 | SRCS-$(CONFIG_CMD_HEAD)+= head.c 20 | SRCS-$(CONFIG_CMD_HOSTNAME)+= hostname.c 21 | SRCS-$(CONFIG_CMD_KILL)+= kill.c 22 | SRCS-$(CONFIG_CMD_LS)+= ls.c 23 | SRCS-$(CONFIG_CMD_MKDIR)+= mkdir.c 24 | SRCS-$(CONFIG_CMD_MKFIFO)+= mkfifo.c 25 | SRCS-$(CONFIG_CMD_MOUNT)+= mount.c 26 | SRCS-$(CONFIG_CMD_MV)+= mv.c 27 | SRCS-$(CONFIG_CMD_NICE)+= nice.c 28 | SRCS-$(CONFIG_CMD_PS)+= ps.c 29 | SRCS-$(CONFIG_CMD_PWD)+= pwd.c 30 | SRCS-$(CONFIG_CMD_REBOOT)+= reboot.c 31 | SRCS-$(CONFIG_CMD_RM)+= rm.c 32 | SRCS-$(CONFIG_CMD_RMDIR)+= rmdir.c 33 | SRCS-$(CONFIG_CMD_SHUTDOWN)+= shutdown.c 34 | SRCS-$(CONFIG_CMD_SLEEP)+= sleep.c 35 | SRCS-$(CONFIG_CMD_SYNC)+= sync.c 36 | SRCS-$(CONFIG_CMD_TEST)+= test.c 37 | SRCS-$(CONFIG_CMD_TOUCH)+= touch.c 38 | SRCS-$(CONFIG_CMD_UMOUNT)+= umount.c 39 | SRCS-$(CONFIG_CMD_UNAME)+= uname.c 40 | SRCS-$(CONFIG_CMD_SH)+= sh.c cd.c exec.c cmds.c 41 | 42 | SRCS+= $(SRCS-y) 43 | 44 | include $(SRCDIR)/mk/prog.mk 45 | -------------------------------------------------------------------------------- /usr/bin/cp/Makefile: -------------------------------------------------------------------------------- 1 | PROG= cp 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/date/Makefile: -------------------------------------------------------------------------------- 1 | PROG= date 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/dmesg/Makefile: -------------------------------------------------------------------------------- 1 | PROG= dmesg 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/echo/Makefile: -------------------------------------------------------------------------------- 1 | PROG= echo 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/free/Makefile: -------------------------------------------------------------------------------- 1 | PROG= free 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/head/Makefile: -------------------------------------------------------------------------------- 1 | PROG= head 2 | include $(SRCDIR)/mk/prog.mk 3 | -------------------------------------------------------------------------------- /usr/bin/hostname/Makefile: -------------------------------------------------------------------------------- 1 | PROG= hostname 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/init/Makefile: -------------------------------------------------------------------------------- 1 | PROG= init 2 | #DISASM= init.lst 3 | #MAP= init.map 4 | 5 | include $(SRCDIR)/mk/prog.mk 6 | -------------------------------------------------------------------------------- /usr/bin/kill/Makefile: -------------------------------------------------------------------------------- 1 | PROG= kill 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/ls/Makefile: -------------------------------------------------------------------------------- 1 | PROG= ls 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/mkdir/Makefile: -------------------------------------------------------------------------------- 1 | PROG= mkdir 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/mkfifo/Makefile: -------------------------------------------------------------------------------- 1 | PROG= mkfifo 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/mount/Makefile: -------------------------------------------------------------------------------- 1 | PROG= mount 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/mv/Makefile: -------------------------------------------------------------------------------- 1 | PROG= mv 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/nice/Makefile: -------------------------------------------------------------------------------- 1 | PROG= nice 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/ps/Makefile: -------------------------------------------------------------------------------- 1 | PROG= ps 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/pwd/Makefile: -------------------------------------------------------------------------------- 1 | PROG= pwd 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/reboot/Makefile: -------------------------------------------------------------------------------- 1 | PROG= reboot 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/rm/Makefile: -------------------------------------------------------------------------------- 1 | PROG= rm 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/rmdir/Makefile: -------------------------------------------------------------------------------- 1 | PROG= rmdir 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/sh/Makefile: -------------------------------------------------------------------------------- 1 | PROG= sh 2 | SRCS= sh.c cd.c exec.c cmds.c 3 | 4 | include $(SRCDIR)/mk/prog.mk 5 | -------------------------------------------------------------------------------- /usr/bin/shutdown/Makefile: -------------------------------------------------------------------------------- 1 | PROG= shutdown 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/sleep/Makefile: -------------------------------------------------------------------------------- 1 | PROG= sleep 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/sync/Makefile: -------------------------------------------------------------------------------- 1 | PROG= sync 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/test/Makefile: -------------------------------------------------------------------------------- 1 | PROG= test 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/touch/Makefile: -------------------------------------------------------------------------------- 1 | PROG= touch 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/umount/Makefile: -------------------------------------------------------------------------------- 1 | PROG= umount 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/bin/uname/Makefile: -------------------------------------------------------------------------------- 1 | PROG= uname 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/include/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef _ERRNO_H_ 2 | #define _ERRNO_H_ 3 | 4 | #include 5 | 6 | extern int errno; /* global error number */ 7 | 8 | #endif /* !_ERRNO_H_ */ 9 | -------------------------------------------------------------------------------- /usr/include/fcntl.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | -------------------------------------------------------------------------------- /usr/include/libgen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997 Todd C. Miller 3 | * 4 | * Permission to use, copy, modify, and distribute this software for any 5 | * purpose with or without fee is hereby granted, provided that the above 6 | * copyright notice and this permission notice appear in all copies. 7 | * 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | */ 16 | 17 | #ifndef _LIBGEN_H_ 18 | #define _LIBGEN_H_ 19 | 20 | #include 21 | 22 | __BEGIN_DECLS 23 | char *basename(const char *); 24 | char *dirname(const char *); 25 | __END_DECLS 26 | 27 | #endif /* _LIBGEN_H_ */ 28 | -------------------------------------------------------------------------------- /usr/include/stdarg.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | -------------------------------------------------------------------------------- /usr/include/termios.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /usr/lib/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= crt libsa libc libpthread 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | -------------------------------------------------------------------------------- /usr/lib/crt/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= ../crt0.o 2 | 3 | VPATH := $(SRCDIR)/usr/arch/$(ARCH):$(VPATH) 4 | OBJS = crt0.o crt1.o 5 | 6 | include $(SRCDIR)/mk/obj.mk 7 | -------------------------------------------------------------------------------- /usr/lib/libc/Makefile: -------------------------------------------------------------------------------- 1 | LIB= ../libc.a 2 | 3 | include $(SRCDIR)/usr/lib/prex/Makefile.inc 4 | include $(SRCDIR)/usr/lib/posix/Makefile.inc 5 | include $(SRCDIR)/usr/lib/libc/ctype/Makefile.inc 6 | include $(SRCDIR)/usr/lib/libc/errno/Makefile.inc 7 | include $(SRCDIR)/usr/lib/libc/gen/Makefile.inc 8 | include $(SRCDIR)/usr/lib/libc/stdio/Makefile.inc 9 | include $(SRCDIR)/usr/lib/libc/stdlib/Makefile.inc 10 | include $(SRCDIR)/usr/lib/libc/string/Makefile.inc 11 | include $(SRCDIR)/usr/lib/libc/termios/Makefile.inc 12 | include $(SRCDIR)/usr/lib/libc/time/Makefile.inc 13 | 14 | CFLAGS_malloc.o += -D_REENTRANT 15 | 16 | include $(SRCDIR)/mk/lib.mk 17 | -------------------------------------------------------------------------------- /usr/lib/libc/ctype/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/libc/ctype:$(VPATH) 2 | 3 | SRCS+= isalnum.c isalpha.c iscntrl.c isdigit.c isgraph.c islower.c \ 4 | isprint.c ispunct.c isspace.c isupper.c isxdigit.c isblank.c \ 5 | tolower.c toupper.c 6 | -------------------------------------------------------------------------------- /usr/lib/libc/ctype/isalnum.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | int 33 | isalnum(int c) 34 | { 35 | return (isalpha(c) || isdigit(c)); 36 | } 37 | -------------------------------------------------------------------------------- /usr/lib/libc/ctype/isblank.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | int 33 | isblank(int c) 34 | { 35 | return (c == ' ' || c == '\t'); 36 | } 37 | -------------------------------------------------------------------------------- /usr/lib/libc/ctype/iscntrl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | int 33 | iscntrl(int c) 34 | { 35 | return (c == 127 || (c >= 0 && c <= 31)); 36 | } 37 | -------------------------------------------------------------------------------- /usr/lib/libc/ctype/isdigit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | int 33 | isdigit(int c) 34 | { 35 | return (c >= '0' && c <= '9'); 36 | } 37 | -------------------------------------------------------------------------------- /usr/lib/libc/ctype/isgraph.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | int 33 | isgraph(int c) 34 | { 35 | return (isprint(c) && c != ' '); 36 | } 37 | -------------------------------------------------------------------------------- /usr/lib/libc/ctype/islower.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | int 33 | islower(int c) 34 | { 35 | return (c >= 'a' && c <= 'z'); 36 | } 37 | -------------------------------------------------------------------------------- /usr/lib/libc/ctype/isprint.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | int 33 | isprint(int c) 34 | { 35 | return (c >= 0x20 && c <= 0x7E); 36 | } 37 | -------------------------------------------------------------------------------- /usr/lib/libc/ctype/ispunct.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | int 33 | ispunct(int c) 34 | { 35 | return (isprint(c) && !isspace(c) && !isalnum(c)); 36 | } 37 | -------------------------------------------------------------------------------- /usr/lib/libc/ctype/isupper.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | int 33 | isupper(int c) 34 | { 35 | return (c >= 'A' && c <= 'Z'); 36 | } 37 | -------------------------------------------------------------------------------- /usr/lib/libc/errno/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/libc/errno:$(VPATH) 2 | 3 | SRCS+= errno.c errlst.c 4 | -------------------------------------------------------------------------------- /usr/lib/libc/errno/errno.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | int errno; 31 | -------------------------------------------------------------------------------- /usr/lib/libc/gen/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/libc/gen:$(SRCDIR)/usr/arch/$(ARCH):$(VPATH) 2 | 3 | SRCS+= __libc_init.c assert.c \ 4 | setjmp.c \ 5 | execl.c execlp.c execle.c execv.c execvp.c \ 6 | isatty.c time.c basename.c dirname.c \ 7 | gethostname.c sethostname.c \ 8 | err.c errx.c verr.c verrx.c \ 9 | warn.c warnx.c vwarn.c vwarnx.c \ 10 | getpagesize.c confstr.c 11 | -------------------------------------------------------------------------------- /usr/lib/libc/gen/getpagesize.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | int 33 | getpagesize(void) 34 | { 35 | return PAGE_SIZE; 36 | } 37 | -------------------------------------------------------------------------------- /usr/lib/libc/stdio/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/libc/stdio:$(VPATH) 2 | 3 | SRCS+= clrerr.c fclose.c fdopen.c feof.c ferror.c fflush.c fgetc.c \ 4 | fgetpos.c fgets.c fileno.c findfp.c flags.c fopen.c \ 5 | fprintf.c fpurge.c fputc.c fputs.c fread.c freopen.c fscanf.c \ 6 | fseek.c fsetpos.c ftell.c fvwrite.c fwalk.c fwrite.c \ 7 | getc.c getchar.c gets.c getw.c makebuf.c mktemp.c \ 8 | printf.c putc.c putchar.c puts.c putw.c refill.c remove.c rewind.c \ 9 | scanf.c setbuf.c setbuffer.c setvbuf.c snprintf.c sprintf.c \ 10 | sscanf.c stdio.c ungetc.c vfprintf.c \ 11 | vfscanf.c vprintf.c vscanf.c vsnprintf.c vsprintf.c vsscanf.c \ 12 | wsetup.c \ 13 | perror.c tmpfile.c tmpnam.c tempnam.c 14 | -------------------------------------------------------------------------------- /usr/lib/libc/stdlib/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/libc/stdlib:$(VPATH) 2 | 3 | SRCS+= abort.c abs.c atexit.c atof.c atoi.c atol.c div.c exit.c \ 4 | getopt.c getsubopt.c strtol.c strtoul.c rand.c random.c \ 5 | getenv.c setenv.c calloc.c qsort.c 6 | -------------------------------------------------------------------------------- /usr/lib/libc/string/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/libc/string:$(VPATH) 2 | 3 | SRCS+= bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c \ 4 | memcmp.c memcpy.c memmove.c memset.c rindex.c strcasecmp.c strcat.c \ 5 | strchr.c strcmp.c strcoll.c strcpy.c strncpy.c strncat.c strcspn.c \ 6 | strlen.c strmode.c strdup.c strncmp.c strerror.c \ 7 | strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c strtok_r.c \ 8 | strxfrm.c swab.c strlcpy.c strlcat.c strnlen.c 9 | -------------------------------------------------------------------------------- /usr/lib/libc/string/bzero.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: bzero.c,v 1.8 1998/08/04 06:25:10 perry Exp $ */ 2 | 3 | #define BZERO 4 | #include "memset.c" 5 | -------------------------------------------------------------------------------- /usr/lib/libc/string/memcpy.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: memcpy.c,v 1.1 1998/08/04 04:48:17 perry Exp $ */ 2 | 3 | #define MEMCOPY 4 | #include "bcopy.c" 5 | -------------------------------------------------------------------------------- /usr/lib/libc/string/memmove.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: memmove.c,v 1.1 1998/08/04 04:48:17 perry Exp $ */ 2 | 3 | #define MEMMOVE 4 | #include "bcopy.c" 5 | -------------------------------------------------------------------------------- /usr/lib/libc/string/strchr.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: strchr.c,v 1.1 1998/08/04 04:48:17 perry Exp $ */ 2 | 3 | #define STRCHR 4 | #include "index.c" 5 | -------------------------------------------------------------------------------- /usr/lib/libc/string/strlcpy.c: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: strlcpy.c,v 1.10 2005/08/08 08:05:37 espie Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 1998 Todd C. Miller 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | /* 23 | * Copy src to string dst of size siz. At most siz-1 characters 24 | * will be copied. Always NUL terminates (unless siz == 0). 25 | * Returns strlen(src); if retval >= siz, truncation occurred. 26 | */ 27 | size_t 28 | strlcpy(char *dst, const char *src, size_t siz) 29 | { 30 | char *d = dst; 31 | const char *s = src; 32 | size_t n = siz; 33 | 34 | /* Copy as many bytes as will fit */ 35 | if (n != 0 && --n != 0) { 36 | do { 37 | if ((*d++ = *s++) == 0) 38 | break; 39 | } while (--n != 0); 40 | } 41 | 42 | /* Not enough room in dst, add NUL and traverse rest of src */ 43 | if (n == 0) { 44 | if (siz != 0) 45 | *d = '\0'; /* NUL-terminate dst */ 46 | while (*s++) 47 | ; 48 | } 49 | 50 | return(s - src - 1); /* count does not include NUL */ 51 | } 52 | -------------------------------------------------------------------------------- /usr/lib/libc/string/strrchr.c: -------------------------------------------------------------------------------- 1 | /* $NetBSD: strrchr.c,v 1.1 1998/08/04 04:48:17 perry Exp $ */ 2 | 3 | #define STRRCHR 4 | #include "rindex.c" 5 | -------------------------------------------------------------------------------- /usr/lib/libc/termios/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/libc/termios:$(VPATH) 2 | 3 | SRCS+= tcgetattr.c tcsetattr.c tcgetpgrp.c tcsetpgrp.c \ 4 | cfgetospeed.c cfsetospeed.c cfgetispeed.c cfsetispeed.c cfsetspeed.c \ 5 | cfmakeraw.c tcsendbreak.c tcdrain.c tcflush.c tcflow.c 6 | -------------------------------------------------------------------------------- /usr/lib/libc/time/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/libc/time:$(VPATH) 2 | 3 | SRCS+= strftime.c gmtime.c gmtime_r.c localtime.c localtime_r.c \ 4 | asctime.c asctime_r.c mktime.c 5 | -------------------------------------------------------------------------------- /usr/lib/libc/time/asctime_r.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** This file is in the public domain, so clarified as of 3 | ** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov). 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | /* 11 | ** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, Second Edition, 1996-07-12. 12 | */ 13 | 14 | char * 15 | asctime_r(timeptr, buf) 16 | register const struct tm * timeptr; 17 | char * buf; 18 | { 19 | static const char wday_name[][3] = { 20 | "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" 21 | }; 22 | static const char mon_name[][3] = { 23 | "Jan", "Feb", "Mar", "Apr", "May", "Jun", 24 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" 25 | }; 26 | const char *wn; 27 | const char *mn; 28 | 29 | wn = wday_name[timeptr->tm_wday]; 30 | mn = mon_name[timeptr->tm_mon]; 31 | /* 32 | ** The X3J11-suggested format is 33 | ** "%.3s %.3s%3d %02.2d:%02.2d:%02.2d %d\n" 34 | ** Since the .2 in 02.2d is ignored, we drop it. 35 | */ 36 | (void)sprintf(buf, 37 | "%.3s %.3s%3d %02d:%02d:%02d %d\n", 38 | wn, mn, 39 | timeptr->tm_mday, timeptr->tm_hour, 40 | timeptr->tm_min, timeptr->tm_sec, 41 | 1900 + timeptr->tm_year); 42 | return buf; 43 | } 44 | -------------------------------------------------------------------------------- /usr/lib/libpthread/Makefile: -------------------------------------------------------------------------------- 1 | LIB= ../libpthread.a 2 | 3 | include $(SRCDIR)/usr/lib/posix/pthread/Makefile.inc 4 | 5 | include $(SRCDIR)/mk/lib.mk 6 | -------------------------------------------------------------------------------- /usr/lib/libsa/Makefile: -------------------------------------------------------------------------------- 1 | LIB= ../libsa.a 2 | 3 | SRCS= __libc_init.c _exit.c _stdio.c getchar.c \ 4 | putchar.c puts.c printf.c \ 5 | vsprintf.c assert.c sprintf.c syslog.c sigstub.c 6 | 7 | CFLAGS+= -D_STANDALONE 8 | CPPFLAGS+= -D_STANDALONE 9 | 10 | include $(SRCDIR)/usr/lib/prex/Makefile.inc 11 | include $(SRCDIR)/usr/lib/libc/ctype/Makefile.inc 12 | include $(SRCDIR)/usr/lib/libc/errno/Makefile.inc 13 | include $(SRCDIR)/usr/lib/libc/stdlib/Makefile.inc 14 | include $(SRCDIR)/usr/lib/libc/string/Makefile.inc 15 | 16 | CFLAGS_malloc.o += -D_REENTRANT 17 | 18 | include $(SRCDIR)/mk/lib.mk 19 | -------------------------------------------------------------------------------- /usr/lib/libsa/__libc_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | void __libc_init(void); 30 | 31 | 32 | void 33 | __libc_init(void) 34 | { 35 | } 36 | -------------------------------------------------------------------------------- /usr/lib/libsa/sigstub.c: -------------------------------------------------------------------------------- 1 | /* signal handling stub for setjmp / longjmp */ 2 | 3 | int sigstub(int mask) 4 | { 5 | return (mask); 6 | } 7 | 8 | int sigsetmask(int mask) __attribute__ ((weak, alias ("sigstub"))); 9 | int sigblock(int mask) __attribute__ ((weak, alias ("sigstub"))); 10 | -------------------------------------------------------------------------------- /usr/lib/posix/Makefile.inc: -------------------------------------------------------------------------------- 1 | 2 | include $(SRCDIR)/usr/lib/posix/signal/Makefile.inc 3 | include $(SRCDIR)/usr/lib/posix/process/Makefile.inc 4 | include $(SRCDIR)/usr/lib/posix/file/Makefile.inc 5 | include $(SRCDIR)/usr/lib/posix/exec/Makefile.inc 6 | include $(SRCDIR)/usr/lib/posix/gen/Makefile.inc 7 | include $(SRCDIR)/usr/lib/posix/time/Makefile.inc 8 | #pthread is handled separately -------------------------------------------------------------------------------- /usr/lib/posix/exec/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/posix/exec:$(VPATH) 2 | 3 | SRCS+= execve.c 4 | -------------------------------------------------------------------------------- /usr/lib/posix/file/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/posix/file:$(VPATH) 2 | 3 | SRCS+= __file.c \ 4 | mount.c umount.c sync.c \ 5 | access.c creat.c open.c close.c read.c write.c lseek.c rewinddir.c \ 6 | fstat.c stat.c lstat.c fsync.c dup.c dup2.c \ 7 | opendir.c closedir.c readdir.c rename.c chdir.c getcwd.c \ 8 | link.c unlink.c rmdir.c mkdir.c mkfifo.c mknod.c chmod.c chown.c \ 9 | umask.c ioctl.c fcntl.c pipe.c 10 | -------------------------------------------------------------------------------- /usr/lib/posix/gen/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/posix/gen:$(VPATH) 2 | 3 | SRCS+= __posix_init.c __posix_call.c uname.c syslog.c alarm.c reboot.c 4 | -------------------------------------------------------------------------------- /usr/lib/posix/process/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/posix/process:$(VPATH) 2 | 3 | SRCS+= __process.c kill.c killpg.c \ 4 | getpgid.c getpgrp.c getpid.c getppid.c \ 5 | getuid.c geteuid.c setuid.c seteuid.c \ 6 | getgid.c setgid.c getegid.c setegid.c \ 7 | setsid.c getsid.c \ 8 | nice.c setpgid.c setpgrp.c sleep.c wait.c waitpid.c _exit.c \ 9 | getpriority.c setpriority.c gettask.c fork.c 10 | -------------------------------------------------------------------------------- /usr/lib/posix/process/getegid.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include 32 | 33 | gid_t 34 | getegid(void) 35 | { 36 | 37 | return (uid_t)1; 38 | } 39 | -------------------------------------------------------------------------------- /usr/lib/posix/process/geteuid.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include 32 | 33 | uid_t 34 | geteuid(void) 35 | { 36 | 37 | return (uid_t)1; 38 | } 39 | -------------------------------------------------------------------------------- /usr/lib/posix/process/getgid.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include 32 | 33 | gid_t 34 | getgid(void) 35 | { 36 | 37 | return (uid_t)1; 38 | } 39 | -------------------------------------------------------------------------------- /usr/lib/posix/pthread/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/posix/pthread:$(VPATH) 2 | 3 | SRCS+= pthread_create.c pthread_attr_init.c \ 4 | pthread_attr_setschedparam.c pthread_attr_getschedparam.c \ 5 | pthread_attr_setschedpolicy.c pthread_attr_getschedpolicy.c \ 6 | pthread_attr_setstacksize.c pthread_attr_getstacksize.c \ 7 | pthread_attr_setname.c pthread_attr_setspecific.c 8 | -------------------------------------------------------------------------------- /usr/lib/posix/signal/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/posix/signal:$(VPATH) 2 | 3 | SRCS+= __exception.c \ 4 | pause.c sigaction.c signal.c sigpending.c sigprocmask.c \ 5 | sigsuspend.c sigcompat.c siglist.c 6 | -------------------------------------------------------------------------------- /usr/lib/posix/time/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/posix/time:$(VPATH) 2 | 3 | SRCS+= gettimeofday.c 4 | -------------------------------------------------------------------------------- /usr/lib/prex/Makefile.inc: -------------------------------------------------------------------------------- 1 | include $(SRCDIR)/usr/lib/prex/syscalls/Makefile.inc 2 | include $(SRCDIR)/usr/lib/prex/malloc/Makefile.inc 3 | include $(SRCDIR)/usr/lib/prex/gen/Makefile.inc 4 | -------------------------------------------------------------------------------- /usr/lib/prex/gen/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/prex/gen:$(VPATH) 2 | 3 | SRCS+= panic.c dprintf.c 4 | -------------------------------------------------------------------------------- /usr/lib/prex/malloc/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/prex/malloc:$(VPATH) 2 | 3 | SRCS+= malloc.c malloc_r.c realloc.c 4 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/Makefile.inc: -------------------------------------------------------------------------------- 1 | VPATH:= $(SRCDIR)/usr/lib/prex/syscalls:$(SRCDIR)/usr/arch/$(ARCH):$(VPATH) 2 | 3 | OBJS+= _systrap.o \ 4 | object_create.o object_destroy.o object_lookup.o \ 5 | msg_send.o msg_receive.o msg_reply.o \ 6 | vm_allocate.o vm_free.o vm_attribute.o vm_map.o \ 7 | task_create.o task_terminate.o task_self.o \ 8 | task_suspend.o task_resume.o task_name.o task_getcap.o task_setcap.o \ 9 | thread_create.o thread_terminate.o thread_load.o thread_self.o \ 10 | thread_yield.o thread_suspend.o thread_resume.o thread_schedparam.o \ 11 | thread_getprio.o thread_setprio.o \ 12 | thread_getpolicy.o thread_setpolicy.o \ 13 | timer_sleep.o timer_alarm.o timer_periodic.o \ 14 | _timer_waitperiod.o timer_waitperiod.o \ 15 | exception_setup.o exception_return.o \ 16 | exception_raise.o exception_wait.o \ 17 | device_open.o device_close.o device_read.o device_write.o \ 18 | device_ioctl.o \ 19 | mutex_init.o mutex_destroy.o mutex_trylock.o mutex_unlock.o \ 20 | _mutex_lock.o mutex_lock.o \ 21 | cond_init.o cond_destroy.o cond_signal.o cond_broadcast.o \ 22 | _cond_wait.o cond_wait.o \ 23 | sem_init.o sem_destroy.o sem_trywait.o sem_post.o sem_getvalue.o \ 24 | _sem_wait.o sem_wait.o \ 25 | sys_log.o sys_info.o sys_panic.o sys_time.o \ 26 | sys_debug.o thread_name.o 27 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/cond_broadcast.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(cond_broadcast) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/cond_destroy.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(cond_destroy) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/cond_init.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(cond_init) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/cond_signal.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(cond_signal) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/device_close.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(device_close) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/device_ioctl.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL3(device_ioctl) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/device_open.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL3(device_open) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/device_read.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL4(device_read) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/device_write.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL4(device_write) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/exception_raise.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(exception_raise) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/exception_return.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(exception_return) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/exception_setup.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(exception_setup) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/exception_wait.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(exception_wait) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/msg_receive.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL4(msg_receive) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/msg_reply.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL3(msg_reply) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/msg_send.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL4(msg_send) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/mutex_destroy.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(mutex_destroy) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/mutex_init.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(mutex_init) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/mutex_trylock.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(mutex_trylock) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/mutex_unlock.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(mutex_unlock) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/object_create.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(object_create) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/object_destroy.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(object_destroy) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/object_lookup.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(object_lookup) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/sem_destroy.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(sem_destroy) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/sem_getvalue.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(sem_getvalue) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/sem_init.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(sem_init) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/sem_post.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(sem_post) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/sem_trywait.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(sem_trywait) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/sys_debug.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2008, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(sys_debug) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/sys_info.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(sys_info) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/sys_log.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(sys_log) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/sys_panic.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(sys_panic) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/sys_time.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(sys_time) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/task_create.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL3(task_create) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/task_getcap.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005-2006, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(task_getcap) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/task_name.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(task_name) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/task_resume.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(task_resume) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/task_self.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL0(task_self) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/task_setcap.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005-2006, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(task_setcap) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/task_suspend.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(task_suspend) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/task_terminate.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(task_terminate) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/thread_create.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(thread_create) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/thread_load.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL3(thread_load) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/thread_name.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(thread_name) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/thread_resume.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(thread_resume) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/thread_schedparam.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL3(thread_schedparam) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/thread_self.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL0(thread_self) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/thread_suspend.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(thread_suspend) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/thread_terminate.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL1(thread_terminate) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/thread_yield.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL0(thread_yield) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/timer_alarm.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(timer_alarm) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/timer_periodic.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL3(timer_periodic) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/timer_sleep.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(timer_sleep) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/vm_allocate.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL4(vm_allocate) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/vm_attribute.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005-2006, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL3(vm_attribute) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/vm_free.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL2(vm_free) 34 | -------------------------------------------------------------------------------- /usr/lib/prex/syscalls/vm_map.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, Kohsuke Ohtani 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 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the author nor the names of any co-contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include "syscall.h" 32 | 33 | SYSCALL4(vm_map) 34 | -------------------------------------------------------------------------------- /usr/sample/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= alarm balls cpumon bench hello ipc mutex sem task thread \ 2 | tetris 3 | 4 | include $(SRCDIR)/mk/subdir.mk 5 | -------------------------------------------------------------------------------- /usr/sample/alarm/Makefile: -------------------------------------------------------------------------------- 1 | TASK= alarm 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/sample/balls/Makefile: -------------------------------------------------------------------------------- 1 | TASK= balls 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/sample/bench/Makefile: -------------------------------------------------------------------------------- 1 | TASK= bench 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/sample/cpumon/Makefile: -------------------------------------------------------------------------------- 1 | TASK= cpumon 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/sample/hello/Makefile: -------------------------------------------------------------------------------- 1 | PROG= hello 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/sample/ipc/Makefile: -------------------------------------------------------------------------------- 1 | TASK= ipc 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/sample/mutex/Makefile: -------------------------------------------------------------------------------- 1 | TASK= mutex 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/sample/sem/Makefile: -------------------------------------------------------------------------------- 1 | TASK= sem 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/sample/task/Makefile: -------------------------------------------------------------------------------- 1 | TASK= task 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/sample/tetris/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= tetris 2 | SRCS= shapes.c tetris.c input.c screen.c 3 | 4 | #MAP= tetris.map 5 | #DISASM= tetris.lst 6 | #SYMBOL= tetris.sym 7 | 8 | include $(SRCDIR)/mk/prog.mk 9 | -------------------------------------------------------------------------------- /usr/sample/thread/Makefile: -------------------------------------------------------------------------------- 1 | TASK= thread 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/server/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIR= fs boot proc exec 2 | 3 | include $(SRCDIR)/mk/subdir.mk 4 | -------------------------------------------------------------------------------- /usr/server/boot/Makefile: -------------------------------------------------------------------------------- 1 | PROG= boot 2 | SRCS= main.c fstab.c 3 | 4 | include $(SRCDIR)/mk/prog.mk 5 | -------------------------------------------------------------------------------- /usr/server/exec/Makefile: -------------------------------------------------------------------------------- 1 | PROG= exec 2 | VPATH := $(SRCDIR)/usr/arch/$(ARCH):$(VPATH) 3 | SRCS= main.c elf.c args.c exec_conf.c elf_reloc.c 4 | 5 | include $(SRCDIR)/mk/prog.mk 6 | -------------------------------------------------------------------------------- /usr/server/fs/Makefile: -------------------------------------------------------------------------------- 1 | PROG= fs 2 | SUBDIR= vfs 3 | OBJS= ./vfs/vfscore.o 4 | 5 | ifeq ($(CONFIG_DEVFS),y) 6 | SUBDIR+= devfs 7 | OBJS+= ./devfs/devfs.o 8 | endif 9 | ifeq ($(CONFIG_RAMFS),y) 10 | SUBDIR+= ramfs 11 | OBJS+= ./ramfs/ramfs.o 12 | endif 13 | ifeq ($(CONFIG_ARFS),y) 14 | SUBDIR+= arfs 15 | OBJS+= ./arfs/arfs.o 16 | endif 17 | ifeq ($(CONFIG_FIFOFS),y) 18 | SUBDIR+= fifofs 19 | OBJS+= ./fifofs/fifofs.o 20 | endif 21 | ifeq ($(CONFIG_FATFS),y) 22 | SUBDIR+= fatfs 23 | OBJS+= ./fatfs/fatfs.o 24 | endif 25 | 26 | include $(SRCDIR)/mk/prog.mk 27 | -------------------------------------------------------------------------------- /usr/server/fs/arfs/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= arfs.o 2 | SRCS= arfs_vfsops.c arfs_vnops.c 3 | 4 | include $(SRCDIR)/mk/obj.mk 5 | -------------------------------------------------------------------------------- /usr/server/fs/devfs/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= devfs.o 2 | SRCS= devfs_vnops.c 3 | 4 | include $(SRCDIR)/mk/obj.mk 5 | -------------------------------------------------------------------------------- /usr/server/fs/fatfs/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= fatfs.o 2 | SRCS= fatfs_fat.c fatfs_node.c fatfs_vfsops.c \ 3 | fatfs_vnops.c fatfs_subr.c 4 | 5 | include $(SRCDIR)/mk/obj.mk 6 | -------------------------------------------------------------------------------- /usr/server/fs/fifofs/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= fifofs.o 2 | SRCS= fifo_vnops.c 3 | 4 | include $(SRCDIR)/mk/obj.mk 5 | -------------------------------------------------------------------------------- /usr/server/fs/ramfs/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= ramfs.o 2 | SRCS= ramfs_vfsops.c ramfs_vnops.c 3 | 4 | include $(SRCDIR)/mk/obj.mk 5 | -------------------------------------------------------------------------------- /usr/server/fs/vfs/Makefile: -------------------------------------------------------------------------------- 1 | TARGET= vfscore.o 2 | SRCS= main.c vfs_conf.c vfs_task.c vfs_syscalls.c \ 3 | vfs_mount.c vfs_bio.c vfs_vnode.c vfs_lookup.c 4 | 5 | include $(SRCDIR)/mk/obj.mk 6 | -------------------------------------------------------------------------------- /usr/server/proc/Makefile: -------------------------------------------------------------------------------- 1 | PROG= proc 2 | SRCS= main.c hash.c pid.c fork.c exit.c kill.c tty.c 3 | #DISASM= proc.lst 4 | #SYMBOL= proc.sym 5 | 6 | include $(SRCDIR)/mk/prog.mk 7 | -------------------------------------------------------------------------------- /usr/test/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Test for kernel 3 | # 4 | SUBDIR= task thread ipc timer exception fault deadlock sem mutex \ 5 | cap dvs ipc_mt kmon 6 | 7 | # 8 | # Test for driver 9 | # 10 | SUBDIR+= console kbd fdd ramdisk reset time zero led 11 | 12 | # 13 | # Test for library 14 | # 15 | SUBDIR+= errno malloc stderr 16 | 17 | # 18 | # Test for servers 19 | # 20 | SUBDIR+= fileio vfork args debug signal fifo pipe fifo2 21 | 22 | include $(SRCDIR)/mk/subdir.mk 23 | -------------------------------------------------------------------------------- /usr/test/args/Makefile: -------------------------------------------------------------------------------- 1 | PROG= args 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/test/cap/Makefile: -------------------------------------------------------------------------------- 1 | TASK= cap 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/console/Makefile: -------------------------------------------------------------------------------- 1 | TASK= console 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/deadlock/Makefile: -------------------------------------------------------------------------------- 1 | TASK= deadlock 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/debug/Makefile: -------------------------------------------------------------------------------- 1 | PROG= debug 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/test/dvs/Makefile: -------------------------------------------------------------------------------- 1 | TASK= dvs 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/errno/Makefile: -------------------------------------------------------------------------------- 1 | TASK= errno 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/exception/Makefile: -------------------------------------------------------------------------------- 1 | TASK= exception 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/fault/Makefile: -------------------------------------------------------------------------------- 1 | TASK= fault 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/fdd/Makefile: -------------------------------------------------------------------------------- 1 | TASK= fdd 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/fifo/Makefile: -------------------------------------------------------------------------------- 1 | PROG= fifo 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/test/fifo2/Makefile: -------------------------------------------------------------------------------- 1 | PROG= fifo 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/test/fileio/Makefile: -------------------------------------------------------------------------------- 1 | PROG= fileio 2 | 3 | include $(SRCDIR)/mk/prog.mk -------------------------------------------------------------------------------- /usr/test/ipc/Makefile: -------------------------------------------------------------------------------- 1 | TASK = ipc 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/ipc_mt/Makefile: -------------------------------------------------------------------------------- 1 | TASK= ipc_mt 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/kbd/Makefile: -------------------------------------------------------------------------------- 1 | TASK= kbd 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/kmon/Makefile: -------------------------------------------------------------------------------- 1 | TASK= kmon 2 | SRCS= kmon.c cmd.c 3 | 4 | include $(SRCDIR)/mk/task.mk 5 | -------------------------------------------------------------------------------- /usr/test/led/Makefile: -------------------------------------------------------------------------------- 1 | TASK= led 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/malloc/Makefile: -------------------------------------------------------------------------------- 1 | TASK= malloc 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/mutex/Makefile: -------------------------------------------------------------------------------- 1 | TASK= mutex 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/pipe/Makefile: -------------------------------------------------------------------------------- 1 | PROG= pipe 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/test/ramdisk/Makefile: -------------------------------------------------------------------------------- 1 | TASK= ramdisk 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/reset/Makefile: -------------------------------------------------------------------------------- 1 | TASK= reset 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/sem/Makefile: -------------------------------------------------------------------------------- 1 | TASK= sem 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/signal/Makefile: -------------------------------------------------------------------------------- 1 | PROG= signal 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/test/stderr/Makefile: -------------------------------------------------------------------------------- 1 | PROG= stderr 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/test/task/Makefile: -------------------------------------------------------------------------------- 1 | TASK= task 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/thread/Makefile: -------------------------------------------------------------------------------- 1 | TASK= thread 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/time/Makefile: -------------------------------------------------------------------------------- 1 | TASK= time 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/timer/Makefile: -------------------------------------------------------------------------------- 1 | TASK= timer 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | -------------------------------------------------------------------------------- /usr/test/vfork/Makefile: -------------------------------------------------------------------------------- 1 | PROG= vfork 2 | 3 | include $(SRCDIR)/mk/prog.mk 4 | -------------------------------------------------------------------------------- /usr/test/zero/Makefile: -------------------------------------------------------------------------------- 1 | TASK= zero 2 | 3 | include $(SRCDIR)/mk/task.mk 4 | --------------------------------------------------------------------------------