summaryrefslogtreecommitdiffstats
path: root/loader/ldt_keeper.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-08 22:26:14 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-08 22:26:14 +0000
commit031c6bf512614d3097ecd17c30eb9c2022804a9a (patch)
tree3d29a9dd51356ebefb788c74f7b9fd5eea94d26c /loader/ldt_keeper.c
parentfeb1135edaf1bea9b3708d17f4772baa451d6212 (diff)
downloadmpv-031c6bf512614d3097ecd17c30eb9c2022804a9a.tar.bz2
mpv-031c6bf512614d3097ecd17c30eb9c2022804a9a.tar.xz
changes merged back from avifile cvs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2140 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/ldt_keeper.c')
-rw-r--r--loader/ldt_keeper.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/loader/ldt_keeper.c b/loader/ldt_keeper.c
index 4cd4d78d20..18ddb22ce3 100644
--- a/loader/ldt_keeper.c
+++ b/loader/ldt_keeper.c
@@ -6,6 +6,8 @@
* and initializes it at the start of player!
*/
+#include "ldt_keeper.h"
+
#include <string.h>
#include <stdlib.h>
#include <errno.h>
@@ -14,7 +16,6 @@
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
-
#ifdef __linux__
#include <asm/unistd.h>
#include <asm/ldt.h>
@@ -36,8 +37,8 @@ extern int sysi86(int, void*);
}
#endif
-#ifndef NUMSYSLDTS /* SunOS 2.5.1 does not define NUMSYSLDTS */
-#define NUMSYSLDTS 6 /* Let's hope the SunOS 5.8 value is OK */
+#ifndef NUMSYSLDTS /* SunOS 2.5.1 does not define NUMSYSLDTS */
+#define NUMSYSLDTS 6 /* Let's hope the SunOS 5.8 value is OK */
#endif
#define TEB_SEL_IDX NUMSYSLDTS
@@ -72,8 +73,6 @@ struct modify_ldt_ldt_s {
#endif
#define TEB_SEL LDT_SEL(TEB_SEL_IDX)
-#include "ldt_keeper.h"
-
/**
*
* This should be performed before we create first thread. See remarks
@@ -81,8 +80,8 @@ struct modify_ldt_ldt_s {
*
*/
-static void* fs_seg=NULL;
-static char* prev_struct=NULL;
+static void* fs_seg = NULL;
+static char* prev_struct = NULL;
/**
* here is a small logical problem with Restore for multithreaded programs -
* in C++ we use static class for this...
@@ -200,18 +199,18 @@ void Setup_LDT_Keeper(void)
#if defined(__svr4__)
{
- struct ssd ssd;
- ssd.sel = TEB_SEL;
- ssd.bo = array.base_addr;
- ssd.ls = array.limit - array.base_addr;
- ssd.acc1 = ((array.read_exec_only == 0) << 1) |
- (array.contents << 2) |
- 0xf0; /* P(resent) | DPL3 | S */
- ssd.acc2 = 0x4; /* byte limit, 32-bit segment */
- if (sysi86(SI86DSCR, &ssd) < 0) {
- perror("sysi86(SI86DSCR)");
- printf("Couldn't install fs segment, expect segfault\n");
- }
+ struct ssd ssd;
+ ssd.sel = TEB_SEL;
+ ssd.bo = array.base_addr;
+ ssd.ls = array.limit - array.base_addr;
+ ssd.acc1 = ((array.read_exec_only == 0) << 1) |
+ (array.contents << 2) |
+ 0xf0; /* P(resent) | DPL3 | S */
+ ssd.acc2 = 0x4; /* byte limit, 32-bit segment */
+ if (sysi86(SI86DSCR, &ssd) < 0) {
+ perror("sysi86(SI86DSCR)");
+ printf("Couldn't install fs segment, expect segfault\n");
+ }
}
#endif