# HG changeset patch # User Sean Halle # Date 1374439319 25200 # Node ID 26458f2b5c23d2c84965890da49a5b200ea8e9f0 # Parent e2db79e4814479c2b640159cef6c689c120c644a started dividing up PR__common.h and PR__common_structs.h versus what's in PR.h diff -r e2db79e48144 -r 26458f2b5c23 PR__WL.h --- a/PR__WL.h Fri Jul 19 12:09:34 2013 -0700 +++ b/PR__WL.h Sun Jul 21 13:41:59 2013 -0700 @@ -6,12 +6,18 @@ * */ + + +/* This header defines the PR functions available to the language's + * wrapper library. + */ + #ifndef _PR__WL_H #define _PR__WL_H #define _GNU_SOURCE -#include "PR_primitive_data_types.h" -#include "PR__structs.h" +#include "PR__common/PR__primitive_data_types.h" +#include "PR__common/PR__common_structs.h" //========================= Function Prototypes =========================== /* MEANING OF WL PI SS int PROS * These indicate which places the function is safe to use. They stand for: diff -r e2db79e48144 -r 26458f2b5c23 PR__common.h --- a/PR__common.h Fri Jul 19 12:09:34 2013 -0700 +++ b/PR__common.h Sun Jul 21 13:41:59 2013 -0700 @@ -10,80 +10,57 @@ #define _PR_H #define _GNU_SOURCE -#include "DynArray/DynArray.h" -#include "Hash_impl/PrivateHash.h" -#include "Histogram/Histogram.h" -#include "Queue_impl/PrivateQueue.h" +//#include "DynArray/DynArray.h" +//#include "Hash_impl/PrivateHash.h" +//#include "Histogram/Histogram.h" +//#include "Queue_impl/PrivateQueue.h" -#include "PR_primitive_data_types.h" -#include "Services_Offered_by_PR/Memory_Handling/vmalloc.h" +#include "PR__primitive_data_types.h" +#include "PR__common_structs.h" +//#include "Services_Offered_by_PR/Memory_Handling/vmalloc.h" -#include -#include +//#include +//#include //================= Defines: included from separate files ================= // // Note: ALL defines are in other files, none are in here // -#include "Defines/PR_defs.h" +//#include "Defines/PR_defs.h" //================================ Typedefs ================================= // -#include "PR__structs.h" +//#include "PR__structs.h" //============================ HW Dependent Fns ================================ -#include "HW_Dependent_Primitives/PR__HW_measurement.h" -#include "HW_Dependent_Primitives/PR__primitives.h" +//#include "HW_Dependent_Primitives/PR__HW_measurement.h" +//#include "HW_Dependent_Primitives/PR__primitives.h" //============================= Global Vars ================================ -volatile TopEnv *_PRTopEnv __align_to_cacheline__; +//volatile TopEnv *_PRTopEnv __align_to_cacheline__; //these are global, but only used for startup and shutdown -pthread_t coreCtlrThdHandles[ NUM_CORES ]; //pthread's virt-procr state -ThdParams *coreCtlrThdParams [ NUM_CORES ]; +//pthread_t coreCtlrThdHandles[ NUM_CORES ]; //pthread's virt-procr state +//ThdParams *coreCtlrThdParams [ NUM_CORES ]; -pthread_mutex_t suspendLock; -pthread_cond_t suspendCond; +//pthread_mutex_t suspendLock; +//pthread_cond_t suspendCond; -//========================= Function Prototypes =========================== -/* MEANING OF WL PI SS int PROS - * These indicate which places the function is safe to use. They stand for: - * - * WL Wrapper Library -- wrapper lib code should only use these - * PI Plugin -- plugin code should only use these - * SS Startup and Shutdown -- designates these relate to startup & shutdown - * int32internal to PR -- should not be used in wrapper lib or plugin - * PROS means "OS functions for applications to use" - * - * PR_int__ functions touch internal PR data structs and are only safe - * to be used inside the master lock. However, occasionally, they appear - * in wrapper-lib or plugin code. In those cases, very careful analysis - * has been done to be sure no concurrency issues could arise. - * - * PR_WL__ functions are all safe for use outside the master lock. - * - * PR_OS are only safe for applications to use -- they're like a second - * language mixed in -- but they can't be used inside plugin code, and - * aren't meant for use in wrapper libraries, because they are themselves - * wrapper-library calls! - */ - -inline bool32 masterFunction( AnimSlot *slot ); //============== include internally used fn prototypes ================ //include fn prototypes used internally in the proto-runtime implementation -#include "PR__int.h" +//#include "PR__int.h" //include fn prototypes used by plugin -#include "PR__PI.h" +//#include "PR__PI.h" //include fn prototype used by wrapper library -#include "PR__WL.h" +//#include "PR__WL.h" //================================= #define implement_me() printf("Unimpl Fn: \n%s \n%s : %d\n", __FILE__, __FUNCTION__, __LINE__) @@ -91,8 +68,8 @@ //========================= Services ======================= -#include "Services_Offered_by_PR/Measurement_and_Stats/probes.h" -#include "Services_Offered_by_PR/Services_Language/PRServ.h" +//#include "Services_Offered_by_PR/Measurement_and_Stats/probes.h" +//#include "Services_Offered_by_PR/Services_Language/PRServ.h" //#include "Services_Offered_by_PR/Services_Language/libPRServ.h" //================================================ diff -r e2db79e48144 -r 26458f2b5c23 PR__common_structs.h --- a/PR__common_structs.h Fri Jul 19 12:09:34 2013 -0700 +++ b/PR__common_structs.h Sun Jul 21 13:41:59 2013 -0700 @@ -10,10 +10,8 @@ #define _PR__structs_H #define _GNU_SOURCE -#include "PR_primitive_data_types.h" - -#include -#include +//#include +//#include //================================ Typedefs ================================= @@ -21,19 +19,19 @@ //= #define ZERO 0 -typedef unsigned long long TSCount; +//typedef unsigned long long TSCount; -typedef struct _AnimSlot AnimSlot; -typedef struct _PRReqst PRReqst; +//typedef struct _AnimSlot AnimSlot; +//typedef struct _PRReqst PRReqst; typedef struct _SlaveVP SlaveVP; -typedef struct _MasterVP MasterVP; +//typedef struct _MasterVP MasterVP; typedef struct _IntervalProbe IntervalProbe; -typedef struct _PRLangEnv PRLangEnv; //a prolog +//typedef struct _PRLangEnv PRLangEnv; //a prolog typedef struct _PRMetaTask PRMetaTask; //a prolog -typedef struct _PRLangData PRLangData; //a prolog -typedef struct _PRCollElem PRCollElem; //generic form of the prologs +//typedef struct _PRLangData PRLangData; //a prolog +//typedef struct _PRCollElem PRCollElem; //generic form of the prologs -typedef bool32 (*SlaveAssigner) ( void *, AnimSlot* ); //langEnv, slot for HW info +//typedef bool32 (*SlaveAssigner) ( void *, AnimSlot* ); //langEnv, slot for HW info typedef void (*RequestHandler) ( void *, SlaveVP *, void * ); //req, slv, langEnv typedef void *(*CreateHandler) ( void *, SlaveVP *, void * ); //req, slv, langEnv typedef void (*LangShutdownHdlr) ( void * ); //langEnv @@ -41,19 +39,19 @@ typedef void (*LangDataFreer) ( void * ); //lang data to free typedef void *(*LangMetaTaskCreator)( SlaveVP * ); //when slave has no meta task for magic num typedef void (*LangMetaTaskFreer) ( void * ); //lang meta task to free -typedef void (*MakeSlaveReadyFn) ( SlaveVP *, void * ); //slave and langEnv -typedef void (*MakeTaskReadyFn) ( void *, void * ); //langTask and langEnv +//typedef void (*MakeSlaveReadyFn) ( SlaveVP *, void * ); //slave and langEnv +//typedef void (*MakeTaskReadyFn) ( void *, void * ); //langTask and langEnv typedef void (*BirthFnPtr) ( void *, SlaveVP * ); //initData, animSlv typedef void BirthFn ( void *, SlaveVP * ); //initData, animSlv -typedef void (*ResumeSlvFnPtr) ( SlaveVP *, void * ); +//typedef void (*ResumeSlvFnPtr) ( SlaveVP *, void * ); //=========== MEASUREMENT STUFF ========== - MEAS__Insert_Counter_Handler +// MEAS__Insert_Counter_Handler //======================================== //============================ HW Dependent Fns ================================ -#include "HW_Dependent_Primitives/PR__HW_measurement.h" -#include "HW_Dependent_Primitives/PR__primitives.h" +//#include "HW_Dependent_Primitives/PR__HW_measurement.h" +//#include "HW_Dependent_Primitives/PR__primitives.h" typedef struct @@ -70,6 +68,7 @@ * stores information about what percent of CPU time the program is getting, * */ +/* typedef struct { int32 numEnvsWithWork; @@ -113,7 +112,7 @@ //========================================== } PRProcess; - +*/ //============= Request Related =========== //