4 #define GET_STRIDE(x) ((x & 0x7000) >> 12)
5 #define GET_RANGE(x) (x & 0x0fff)
6 #define GET_STRIDEINC(x) ((x & 0x8000) >> 15)
8 /****** Global structure **********/
9 typedef struct objOffsetPile {
13 struct objOffsetPile *next;
16 typedef struct perMcPrefetchList {
18 objOffsetPile_t *list;
19 struct perMcPrefetchList *next;
20 } perMcPrefetchList_t;
22 typedef struct proPrefetchQ {
23 perMcPrefetchList_t *front, *rear;
24 pthread_mutex_t qlock;
25 pthread_mutexattr_t qlockattr;
29 // Global Prefetch Processing Queue
30 proPrefetchQ_t prefetchQ;
32 /**** Prefetch Queue to be processed functions ******/
33 void proPrefetchQDealloc(perMcPrefetchList_t *);
35 /******** Process Queue Element functions ***********/
36 void rangePrefetch(int, int, unsigned int *, unsigned short *, short *offset);
37 void *transPrefetchNew();
38 perMcPrefetchList_t* checkIfLocal(char *ptr);
39 int isOidAvail(unsigned int oid);
40 int lookForObjs(int*, short *, int *, int *, int *);
41 void insertPrefetch(int, unsigned int, short, short*, perMcPrefetchList_t **);
42 void sendRangePrefetchReq(perMcPrefetchList_t *, int sd);
44 /************* Internal functions *******************/
45 int getsize(short *ptr, int n);