[Mplayer-cvslog] CVS: main/libdha mtrr.c,1.3,1.4
Arpi of Ize
arpi at mplayerhq.hu
Sun Apr 28 00:42:57 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main configure,1.447,1.448 mangle.h,1.2,1.3
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs vf_lavc.c,NONE,1.1 vf.c,1.24,1.25 Makefile,1.39,1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libdha
In directory mail:/var/tmp.root/cvs-serv19906/libdha
Modified Files:
mtrr.c
Log Message:
OpenBSD, NetBSD portability patches by
Björn Sandell <biorn at dce.chalmers.se>
Marcus <core at antbear.org>
Bernd Ernesti <mplayer at lists.veego.de>
Index: mtrr.c
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/mtrr.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mtrr.c 3 Feb 2002 13:19:39 -0000 1.3
+++ mtrr.c 27 Apr 2002 22:42:24 -0000 1.4
@@ -12,6 +12,12 @@
#include "libdha.h"
#include "AsmMacros.h"
+#if defined (__i386__) && defined (__NetBSD__)
+#include <stdint.h>
+#include <stdlib.h>
+#include <machine/mtrr.h>
+#include <machine/sysarch.h>
+#endif
#if defined( __i386__ )
int mtrr_set_type(unsigned base,unsigned size,int type)
@@ -40,6 +46,23 @@
return wr_len == strlen(sout) ? 0 : EPERM;
}
return ENOSYS;
+#elif defined (__NetBSD__)
+ struct mtrr *mtrrp;
+ int n;
+
+ mtrrp = malloc(sizeof (struct mtrr));
+ mtrrp->base = base;
+ mtrrp->len = size;
+ mtrrp->type = type;
+ mtrrp->flags = MTRR_VALID | MTRR_PRIVATE;
+ n = 1;
+
+ if (i386_set_mtrr(mtrrp, &n) < 0) {
+ free(mtrrp);
+ return errno;
+ }
+ free(mtrrp);
+ return 0;
#else
#warning Please port MTRR stuff!!!
return ENOSYS;
- Previous message: [Mplayer-cvslog] CVS: main configure,1.447,1.448 mangle.h,1.2,1.3
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs vf_lavc.c,NONE,1.1 vf.c,1.24,1.25 Makefile,1.39,1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list