drc related bugfixes

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@822 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2009-10-22 09:54:54 +00:00
parent 65c75cb07d
commit 7f5a3fc12a
3 changed files with 10 additions and 7 deletions

View file

@ -1,5 +1,5 @@
#include <stdio.h>
#if defined(__linux__) && defined(ARM)
#ifdef __linux__
#include <sys/mman.h>
#endif
@ -10,19 +10,17 @@ u8 __attribute__((aligned(4096))) tcache[DRC_TCACHE_SIZE];
void drc_cmn_init(void)
{
#if defined(__linux__) && defined(ARM)
#ifdef __linux__
void *tmp;
tmp = mmap(tcache, DRC_TCACHE_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
printf("mmap tcache: %p, asked %p\n", tmp, tcache);
#endif
}
// TODO: add calls in core, possibly to cart.c?
void drc_cmn_cleanup(void)
{
#if defined(__linux__) && defined(ARM)
#ifdef __linux__
int ret;
ret = munmap(tcache, DRC_TCACHE_SIZE);
printf("munmap tcache: %i\n", ret);