graphicscomposition/openwfcompositionengine/common/src/owfmemory.c
changeset 152 9f1c3fea0f87
parent 0 5d03bc08d59c
child 164 25ffed67c7ef
equal deleted inserted replaced
111:29ddb8a72f0e 152:9f1c3fea0f87
     1 /* Copyright (c) 2009 The Khronos Group Inc.
     1 /* Copyright (c) 2009 The Khronos Group Inc.
       
     2  * Portions copyright (c) 2009-2010  Nokia Corporation and/or its subsidiary(-ies)
     2  *
     3  *
     3  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * copy of this software and/or associated documentation files (the
     5  * copy of this software and/or associated documentation files (the
     5  * "Materials"), to deal in the Materials without restriction, including
     6  * "Materials"), to deal in the Materials without restriction, including
     6  * without limitation the rights to use, copy, modify, merge, publish,
     7  * without limitation the rights to use, copy, modify, merge, publish,
    33 #include <pthread.h>
    34 #include <pthread.h>
    34 
    35 
    35 #include "owfmemory.h"
    36 #include "owfmemory.h"
    36 #include "owfdebug.h"
    37 #include "owfdebug.h"
    37 
    38 
       
    39 #ifdef DEBUG
       
    40 
    38 #define MAGIK   0x05EAF00D
    41 #define MAGIK   0x05EAF00D
    39 #define FENCE1  0xFACED00D
    42 #define FENCE1  0xFACED00D
    40 #define FENCE2  0xFACE50FF
    43 #define FENCE2  0xFACE50FF
    41 
    44 
    42 #define OFFSET(x,y) ((OWFuint32)&(((x*) 0x1000)->y) - 0x1000)
    45 #define OFFSET(x,y) ((OWFuint32)&(((x*) 0x1000)->y) - 0x1000)
    50     OWFuint32                   nInts;
    53     OWFuint32                   nInts;
    51     OWFint                      memory[2];
    54     OWFint                      memory[2];
    52 } BLOCK;
    55 } BLOCK;
    53 
    56 
    54 
    57 
    55 #ifdef DEBUG
    58 
    56 
    59 
    57 static void
    60 static void
    58 OWF_Memory_Shutdown(void);
    61 OWF_Memory_Shutdown(void);
    59 
    62 
    60 #endif
    63 
    61 
    64 
    62 static void
    65 static void
    63 OWF_Memory_LockUnlockManagedBlocks(OWFboolean lock)
    66 OWF_Memory_LockUnlockManagedBlocks(OWFboolean lock)
    64 {
    67 {
    65 #ifndef DEBUG
    68 #ifndef DEBUG
   310 
   313 
   311     }
   314     }
   312     OWF_Memory_UnlockManagedBlocks();
   315     OWF_Memory_UnlockManagedBlocks();
   313 }
   316 }
   314 #endif
   317 #endif
       
   318 #endif
   315 
   319 
   316 #ifdef __cplusplus
   320 #ifdef __cplusplus
   317 }
   321 }
   318 #endif
   322 #endif