ATLAS Offline Software
Functions | Variables
athena Namespace Reference

Functions

const void * page_address (const void *addr)
 
void * page_address (void *addr)
 
void * next_page_address (void *addr)
 
int page_protect (void *addr, int prot)
 
template<typename T >
size_t page_protect (T *addr, int prot)
 protect page containing addr, from page boundary to addr+sizeof(T). More...
 

Variables

string __author__ = 'Wim Lavrijsen (WLavrijsen@lbl.gov)'
 
string __doc__ = 'For details about athena.py, run "less `which athena.py`"'
 
 opts = aop.parse(legacy_args=True)
 
list path_list = ['./'] + os.environ.get('PYTHONPATH', '').split(os.pathsep)
 
 file_path
 
 CA
 
 acc = pickle.load(f)
 
 value
 
 path
 python interpreter configuration --------------------------------------— More...
 
 ps1
 rename ourselfs to athena, both the prompt and the process (for top & ps) More...
 
 ps2
 
 libc = ctypes.cdll.LoadLibrary( ctypes_find_library('c') )
 
int exitcode = 0
 
 run_name
 
 _msg = log
 
 _athena_python_profiler
 
const size_t PAGESIZE = sysconf(_SC_PAGE_SIZE)
 

Function Documentation

◆ next_page_address()

void * athena::next_page_address ( void *  addr)

Definition at line 17 of file page_access.cxx.

17  {
18  return (void*)(((long)addr & ~(PAGESIZE-1)) + PAGESIZE);
19  }

◆ page_address() [1/2]

const void * athena::page_address ( const void *  addr)

Definition at line 11 of file page_access.cxx.

11  {
12  return (const void*)((long)addr & ~(PAGESIZE-1));
13  }

◆ page_address() [2/2]

void * athena::page_address ( void *  addr)

Definition at line 14 of file page_access.cxx.

14  {
15  return (void*)((long)addr & ~(PAGESIZE-1));
16  }

◆ page_protect() [1/2]

template<typename T >
size_t athena::page_protect ( T *  addr,
int  prot 
)

protect page containing addr, from page boundary to addr+sizeof(T).

Returns
amount of mem protected (0 flags an error)

Definition at line 20 of file page_access.h.

20  {
21  void* pageAddr(page_address((void*)addr));
22  size_t lProtected((long)addr-(long)pageAddr+sizeof(T));
23  int rc=mprotect(pageAddr, lProtected, prot);
24  if (rc) printf("page_protect WARNING: mprotect heap failed for address %p\n", (void*)addr);
25 #ifdef DEBUG
26  else printf("page_protect DEBUG: set protection @%i for range @%lx - @%zx containing addr=%p\n",
27  prot,(long unsigned int)page_address(addr),(long unsigned int)addr+sizeof(T), (void*)addr);
28 #endif
29  return (rc == 0 ? lProtected : 0);
30 }

◆ page_protect() [2/2]

int athena::page_protect ( void *  addr,
int  prot 
)

Definition at line 21 of file page_access.cxx.

21  {
22  int rc=mprotect(page_address(addr), PAGESIZE, prot);
23  if (rc) printf("page_protect WARNING: mprotect heap failed for void *address %p\n", addr);
24 #ifdef DEBUG
25  else printf("page_protect DEBUG: set protection @%i for range @%zx - @%zx containing void* addr=%p\n",
26  prot,(size_t)page_address(addr),
27  (size_t)page_address(addr) + PAGESIZE, addr);
28 #endif
29  return rc;
30  }

Variable Documentation

◆ __author__

string athena.__author__ = 'Wim Lavrijsen (WLavrijsen@lbl.gov)'
private

Definition at line 80 of file athena.py.

◆ __doc__

string athena.__doc__ = 'For details about athena.py, run "less `which athena.py`"'
private

Definition at line 81 of file athena.py.

◆ _athena_python_profiler

athena._athena_python_profiler
private

Definition at line 203 of file athena.py.

◆ _msg

athena._msg = log
private

Definition at line 189 of file athena.py.

◆ acc

athena.acc = pickle.load(f)

Definition at line 110 of file athena.py.

◆ CA

athena.CA

Definition at line 100 of file athena.py.

◆ exitcode

int athena.exitcode = 0

Definition at line 161 of file athena.py.

◆ file_path

athena.file_path
Initial value:
1 = FindFile( os.path.expanduser( os.path.expandvars(opts.scripts[0]) ),
2  path_list, os.R_OK )

Definition at line 94 of file athena.py.

◆ libc

athena.libc = ctypes.cdll.LoadLibrary( ctypes_find_library('c') )

Definition at line 141 of file athena.py.

◆ opts

athena.opts = aop.parse(legacy_args=True)

Definition at line 88 of file athena.py.

◆ PAGESIZE

const size_t athena.PAGESIZE = sysconf(_SC_PAGE_SIZE)

Definition at line 9 of file page_access.cxx.

◆ path

athena.path

python interpreter configuration --------------------------------------—

Definition at line 128 of file athena.py.

◆ path_list

list athena.path_list = ['./'] + os.environ.get('PYTHONPATH', '').split(os.pathsep)

Definition at line 93 of file athena.py.

◆ ps1

athena.ps1

rename ourselfs to athena, both the prompt and the process (for top & ps)

Definition at line 135 of file athena.py.

◆ ps2

athena.ps2

Definition at line 136 of file athena.py.

◆ run_name

athena.run_name

Definition at line 166 of file athena.py.

◆ value

athena.value

Definition at line 124 of file athena.py.

athena::page_address
const void * page_address(const void *addr)
Definition: page_access.cxx:11
athena::page_address
void * page_address(void *addr)
Definition: page_access.cxx:14
python.Utils.unixtools.FindFile
def FindFile(filename, pathlist, access)
helper -------------------------------------------------------------------—
Definition: unixtools.py:20
athena::PAGESIZE
const size_t PAGESIZE
Definition: page_access.cxx:9
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:350