1 static char RCSId[] = "$Id: ldtlib.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
2 static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
7 #include <linux/unistd.h>
8 #include <linux/head.h>
11 _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
16 return modify_ldt(0, buffer, 32 * sizeof(struct modify_ldt_ldt_s));
20 set_ldt_entry(int entry, unsigned long base, unsigned int limit,
21 int seg_32bit_flag, int contents, int read_only_flag,
22 int limit_in_pages_flag)
24 struct modify_ldt_ldt_s ldt_info;
26 ldt_info.entry_number = entry;
27 ldt_info.base_addr = base;
28 ldt_info.limit = limit;
29 ldt_info.seg_32bit = seg_32bit_flag;
30 ldt_info.contents = contents;
31 ldt_info.read_exec_only = read_only_flag;
32 ldt_info.limit_in_pages = limit_in_pages_flag;
34 return modify_ldt(1, &ldt_info, sizeof(ldt_info));