summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen LaHaise <bcrl@kvack.org>2002-09-05 04:22:49 +0000
committerBen LaHaise <bcrl@kvack.org>2002-09-05 04:22:49 +0000
commit2372d3b050af6aefe7065ba2a98b00ffaf0bc09f (patch)
tree999e8db63d038848054e6958806b52417aba5fae
parent976262c81ab73f61e6b6682616d669670a4a98ac (diff)
downloadlibaio-2372d3b050af6aefe7065ba2a98b00ffaf0bc09f.tar.gz
remove libredhat-kernel from libaio
-rw-r--r--src/lib/src/Makefile31
-rw-r--r--src/lib/src/aio_syscalls.c79
-rw-r--r--src/lib/src/libredhat-kernel.map11
-rw-r--r--src/lib/src/myln.c42
-rw-r--r--src/lib/src/syscall-i386.h36
5 files changed, 0 insertions, 199 deletions
diff --git a/src/lib/src/Makefile b/src/lib/src/Makefile
deleted file mode 100644
index 01e4089..0000000
--- a/src/lib/src/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-root=/
-all: libredhat-kernel.so
-
-ASFLAGS=-D__KERNEL__ -D__ASSEMBLY__ -I../include -nostdlib -nostartfiles
-CFLAGS=-Wall -D__KERNEL__ -I../include -nostdlib -nostartfiles -O2 -fomit-frame-pointer
-soname=libredhat-kernel.so.1
-dummyver=.0.0
-extraver=.0.1
-
-so_objs=aio_syscalls.o
-
-$(soname): $(so_objs) libredhat-kernel.map
- gcc -nostdlib -nostartfiles -shared -Wl,--version-script=libredhat-kernel.map -Wl,-soname=$(soname) -o $@ $(so_objs)
- strip $@
-
-libredhat-kernel.so: $(soname)
- cp -f $< $@
-
-install:
- install -D -m 755 $(soname) $(root)/lib/kernel/stub/$(soname)$(extraver)
- install -D -m 755 $(soname) $(root)/lib/$(soname)$(dummyver)
- ln -sf $(soname)$(extraver) $(root)/lib/kernel/stub/libredhat-kernel.so
- mkdir -p $(root)/usr/lib
- ln -sf /lib/$(soname)$(dummyver) $(root)/usr/lib/libredhat-kernel.so
-
-clean:
- rm -f *.o *.so myln $(soname)
-
-# test app
-myln: myln.c libredhat-kernel.so Makefile
- cc -g -o myln myln.c -L. -lredhat-kernel
diff --git a/src/lib/src/aio_syscalls.c b/src/lib/src/aio_syscalls.c
deleted file mode 100644
index 5d8ef1b..0000000
--- a/src/lib/src/aio_syscalls.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* libaio Linux async I/O interface
- Copyright 2002 Red Hat, Inc.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#include <stdlib.h>
-
-#include "../../libaio.h"
-#include "../../vsys_def.h"
-
-#include "syscall-i386.h"
-
-#include <asm/errno.h>
-
-
-int vsys_io_setup(unsigned nr_reqs, io_context_t *ctxp)
-{
- return syscall2(__NR_io_setup, nr_reqs, ctxp);
-}
-
-int vsys_io_destroy(io_context_t ctx)
-{
- return syscall1(__NR_io_destroy, ctx);
-}
-
-int vsys_io_submit(io_context_t ctx, long nr, struct iocb *iocbs[])
-{
- return syscall3(__NR_io_submit, ctx, nr, iocbs);
-}
-
-static inline int real_sys_io_cancel(io_context_t ctx, struct iocb *iocb, struct io_event *event)
-{
- return syscall3(__NR_io_cancel, ctx, iocb, event);
-}
-
-/* ABI change. Provide partial compatibility on this one for now. */
-int vsys_io_cancel(io_context_t ctx, struct iocb *iocb)
-{
- struct io_event event;
-
- /* FIXME: the old ABI would return the event on the completion queue */
- return real_sys_io_cancel(ctx, iocb, &event);
-}
-
-int vsys_io_wait(io_context_t ctx, struct iocb *iocb, const struct timespec *when)
-{
- return -ENOSYS;
-}
-
-
-/* ABI change. Provide backwards compatibility for this one. */
-static inline long real_sys_io_getevents(io_context_t ctx_id, long min_nr,
- long nr, struct io_event *events, struct timespec *timeout)
-{
- return syscall5(__NR_io_getevents, ctx_id, min_nr, nr, events, timeout);
-}
-
-int vsys_io_getevents(io_context_t ctx_id, long nr, struct io_event *events,
- const struct timespec *const_timeout)
-{
- struct timespec timeout;
- if (const_timeout)
- timeout = *const_timeout;
- return real_sys_io_getevents(ctx_id, 1, nr, events,
- const_timeout ? &timeout : NULL);
-}
-
diff --git a/src/lib/src/libredhat-kernel.map b/src/lib/src/libredhat-kernel.map
deleted file mode 100644
index 1b0d390..0000000
--- a/src/lib/src/libredhat-kernel.map
+++ /dev/null
@@ -1,11 +0,0 @@
-REDHAT_0.90 {
- global:
- vsys_io_setup;
- vsys_io_destroy;
- vsys_io_submit;
- vsys_io_cancel;
- vsys_io_wait;
- vsys_io_getevents;
- local:
- *;
-};
diff --git a/src/lib/src/myln.c b/src/lib/src/myln.c
deleted file mode 100644
index 4472946..0000000
--- a/src/lib/src/myln.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* libaio Linux async I/O interface
- Copyright 2002 Red Hat, Inc.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/mman.h>
-
-int main ()
-{
- long ctx = 0;
- extern long vsys_io_setup(long, long *);
- unsigned char *bob = (void*)&vsys_io_setup;
- long ret;
- int i;
- printf("%p\n", bob);
- //printf("%p\n", mmap(0, 65536, PROT_READ | PROT_EXEC, MAP_SHARED,
- // open("/dev/vsys", O_RDONLY), 0));
- //for (i=0; i<16; i++)
- // printf(" %02x\n", bob[i]);
- //printf("\n");
-
- ret = vsys_io_setup(100, &ctx);
-
- printf("ret=%ld, ctx=0x%lx\n", ret, ctx);
- return 0;
-}
diff --git a/src/lib/src/syscall-i386.h b/src/lib/src/syscall-i386.h
deleted file mode 100644
index fc67ce8..0000000
--- a/src/lib/src/syscall-i386.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#define __NR_io_setup 245
-#define __NR_io_destroy 246
-#define __NR_io_getevents 247
-#define __NR_io_submit 248
-#define __NR_io_cancel 249
-
-#define syscall1(nr, a) ({ \
- long __ret; \
- __asm__ __volatile__("int $0x80" : "=a" (__ret) : \
- "0" (nr), "b" (a)); \
- __ret; })
-
-#define syscall2(nr, a, b) ({ \
- long __ret; \
- __asm__ __volatile__("int $0x80" : "=a" (__ret) : \
- "0" (nr), "b" (a), "c" (b)); \
- __ret; })
-
-#define syscall3(nr, a, b, c) ({ \
- long __ret; \
- __asm__ __volatile__("int $0x80" : "=a" (__ret) : \
- "0" (nr), "b" (a), "c" (b), "d" (c)); \
- __ret; })
-
-#define syscall4(nr, a, b, c, d) ({ \
- long __ret; \
- __asm__ __volatile__("int $0x80" : "=a" (__ret) : \
- "0" (nr), "b" (a), "c" (b), "d" (c), "S" (d)); \
- __ret; })
-
-#define syscall5(nr, a, b, c, d, e) ({ \
- long __ret; \
- __asm__ __volatile__("int $0x80" : "=a" (__ret) : \
- "0" (nr), "b" (a), "c" (b), "d" (c), "S" (d), "D" (e)); \
- __ret; })
-