VMS/VMS_Implementations/VMS_impls/VMS__MC_shared_impl

view PR.h @ 286:b02b34681414

VReo V2 -- saves checker and doer fn with the port, where triggered
author Sean Halle <seanhalle@yahoo.com>
date Wed, 10 Jul 2013 14:49:04 -0700
parents bc5030385120
children
line source
1 /*
2 * Copyright 2012 OpenSourceResearchInstitute.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 *
7 */
9 #ifndef _PR_H
10 #define _PR_H
11 #define _GNU_SOURCE
13 #include "DynArray/DynArray.h"
14 #include "Hash_impl/PrivateHash.h"
15 #include "Histogram/Histogram.h"
16 #include "Queue_impl/PrivateQueue.h"
18 #include "PR_primitive_data_types.h"
19 #include "Services_Offered_by_PR/Memory_Handling/vmalloc.h"
21 #include <pthread.h>
22 #include <sys/time.h>
24 //================= Defines: included from separate files =================
25 //
26 // Note: ALL defines are in other files, none are in here
27 //
28 #include "Defines/PR_defs.h"
31 //================================ Typedefs =================================
32 //
33 #include "PR__structs.h"
35 //============================ HW Dependent Fns ================================
37 #include "HW_Dependent_Primitives/PR__HW_measurement.h"
38 #include "HW_Dependent_Primitives/PR__primitives.h"
41 //============================= Global Vars ================================
43 volatile TopEnv *_PRTopEnv __align_to_cacheline__;
45 //these are global, but only used for startup and shutdown
46 pthread_t coreCtlrThdHandles[ NUM_CORES ]; //pthread's virt-procr state
47 ThdParams *coreCtlrThdParams [ NUM_CORES ];
49 pthread_mutex_t suspendLock;
50 pthread_cond_t suspendCond;
52 //========================= Function Prototypes ===========================
53 /* MEANING OF WL PI SS int PROS
54 * These indicate which places the function is safe to use. They stand for:
55 *
56 * WL Wrapper Library -- wrapper lib code should only use these
57 * PI Plugin -- plugin code should only use these
58 * SS Startup and Shutdown -- designates these relate to startup & shutdown
59 * int32internal to PR -- should not be used in wrapper lib or plugin
60 * PROS means "OS functions for applications to use"
61 *
62 * PR_int__ functions touch internal PR data structs and are only safe
63 * to be used inside the master lock. However, occasionally, they appear
64 * in wrapper-lib or plugin code. In those cases, very careful analysis
65 * has been done to be sure no concurrency issues could arise.
66 *
67 * PR_WL__ functions are all safe for use outside the master lock.
68 *
69 * PR_OS are only safe for applications to use -- they're like a second
70 * language mixed in -- but they can't be used inside plugin code, and
71 * aren't meant for use in wrapper libraries, because they are themselves
72 * wrapper-library calls!
73 */
75 inline bool32 masterFunction( AnimSlot *slot );
77 //============== include internally used fn prototypes ================
79 //include fn prototypes used internally in the proto-runtime implementation
80 #include "PR__int.h"
82 //include fn prototypes used by plugin
83 #include "PR__PI.h"
85 //include fn prototype used by wrapper library
86 #include "PR__WL.h"
88 //=================================
89 #define implement_me() printf("Unimpl Fn: \n%s \n%s : %d\n", __FILE__, __FUNCTION__, __LINE__)
90 //#define fix_me printf("Fix me at: \n%s \n%s : %s\n", __FILE__, __FUNCTION__, __LINE__)
93 //========================= Services =======================
94 #include "Services_Offered_by_PR/Measurement_and_Stats/probes.h"
95 #include "Services_Offered_by_PR/Services_Language/PRServ.h"
96 //#include "Services_Offered_by_PR/Services_Language/libPRServ.h"
98 //================================================
99 #endif /* _PR_H */