Index: vm/include/open/mainpage.html =================================================================== --- vm/include/open/mainpage.html (revision 507428) +++ vm/include/open/mainpage.html (working copy) @@ -291,324 +291,22 @@ port - APR extension + APR extensions - port/... .h (40 files) - - - - - Component manager - - -

@link include/open/compmgr.h @endlink
- @link include/component_manager.h @endlink

- - - -*/ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @author Andrey Yakushev - */ - -/** \mainpage DRLVM Interfaces -

- The following table maps the DRLVM component structure described in - DRLVM Developers Guide to the directory structure. Click on component - name to see its description. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Component - Prefix - Interfaces - Header files -
- VM core - - vm - - VM Common - - @link include/open/vm.h @endlink
- @link include/open/bytecodes.h @endlink
- @link include/open/common.h @endlink
- @link include/open/vm_util.h @endlink
- @link include/open/types.h @endlink -
-
- VM_JIT - - @link include/jit_import.h @endlink
- @link include/jit_import_rt.h @endlink
- @link include/jit_runtime_support.h @endlink
- @link vmcore/src/util/linux/include/platform.h @endlink
- @link vmcore/src/util/win/include/platform.h @endlink

-
+ @link port/include/port_atomic.h @endlink
+ @link port/include/port_disasm.h @endlink
+ @link port/include/port_dso.h @endlink
+ @link port/include/port_filepath.h @endlink
+ @link port/include/port_sysinfo.h @endlink
+ @link port/include/port_timer.h @endlink
+ @link port/include/port_vmem.h @endlink +
- VM_EM - - -

@link vmcore/include/ini.h @endlink

-
-
- VM_Interpreter - - @link include/interpreter_imports.h @endlink
- @link vmcore/include/Class.h @endlink
- @link vmcore/include/compile.h @endlink
- @link vmcore/include/environment.h @endlink
- @link vmcore/include/exceptions.h @endlink
- @link vmcore/include/exceptions_int.h @endlink
- @link vmcore/include/ini.h @endlink
- @link vmcore/include/jit_export.h @endlink
- @link vmcore/include/jit_runtime_support_common.h @endlink
- @link vmcore/include/mon_enter_exit.h @endlink
- @link vmcore/src/util/linux/include/platform.h @endlink
- @link vmcore/src/util/win/include/platform.h @endlink
- @link vmcore/src/util/linux/include/platform_lowlevel.h @endlink
- @link vmcore/src/util/win/include/platform_lowlevel.h @endlink
- @link vmcore/include/stack_trace.h @endlink
- @link vmcore/include/thread_generic.h @endlink
- @link vmcore/include/thread_manager.h @endlink
- @link vmcore/include/vm_arrays.h @endlink
- @link vmcore/include/vm_core_types.h @endlink
- @link vmcore/include/vm_strings.h @endlink
- @link vmcore/include/vm_threads.h @endlink
-
- VM_GC - - @link include/open/vm_gc.h @endlink
- @link include/slot.h @endlink (?)
-
- VM_Thread - - @link include/open/thread_externals.h @endlink -
- JNI - - -

@link include/jni_types.h @endlink
- @link include/jni.h
@endlink

-
- JVMTI - - -

@link include/jvmti.h @endlink
- @link include/jvmti_support.h @endlink
- @link include/jvmti_types.h @endlink

-
- Kernel classes - @link include/open/vm_kernel_classes.h @endlink
- Execution manager - - em - - EM Common - - -

- @link include/open/em.h @endlink

-
- EM_VM - -

@link include/open/em_vm.h @endlink

-
- EM_JIT - - - @link include/open/em_profile_access.h @endlink - -
- Thread manager - - thread - - TM_VM - - -

@link include/open/jthread.h @endlink
- @link include/open/ti_thread.h @endlink

-
- TM_GC - - -

@link include/open/hycomp.h @endlink
- @link include/open/hythread.h @endlink
- @link include/open/hythread_ext.h @endlink

-
- Thread helpers - - @link include/open/thread_helpers.h @endlink -
- Garbage collector - - gc - - GC Generic - - @link include/open/gc.h @endlink -
- Execution engine - - ee - - JIT_VM - - @link vmcore/include/jit_export.h @endlink
- @link vmcore/include/jit_export_jpda.h @endlink
- @link vmcore/include/jit_export_rt.h @endlink
- @link include/internal_jit_intf.h @endlink
-
JIT_EM - - - @link include/open/ee_em_intf.h @endlink - -
- Interpreter - - @link include/interpreter.h
- @link include/interpreter_exports.h @endlink
-
Class library support module - - vmi - VMI - - - "classlib luni module"/hyvmls.h
- "classlib luni module"/vmi.h -
-
- OS portability layer - - port - - APR extension - - port/... .h (40 files) -
Component manager @@ -618,623 +316,3 @@
*/ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @author Andrey Yakushev - */ - -/** \mainpage DRLVM Interfaces -

- The following table maps the DRLVM component structure described in - DRLVM Developers Guide to the directory structure. Click on component - name to see its description. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Component - Prefix - Interfaces - Header files -
- VM core - - vm - - VM Common - - @link include/open/vm.h @endlink
- @link include/open/bytecodes.h @endlink
- @link include/open/common.h @endlink
- @link include/open/vm_util.h @endlink
- @link include/open/types.h @endlink -
-
- VM_JIT - - - @link include/jit_import.h @endlink
- @link include/jit_import_rt.h @endlink
- @link include/jit_runtime_support.h @endlink
- @link vmcore/src/util/linux/include/platform.h @endlink
- @link vmcore/src/util/win/include/platform.h @endlink

-
-
- VM_EM - - -

@link vmcore/include/ini.h @endlink

-
-
- VM_Interpreter - - @link include/interpreter_imports.h @endlink
- @link vmcore/include/Class.h @endlink
- @link vmcore/include/compile.h @endlink
- @link vmcore/include/environment.h @endlink
- @link vmcore/include/exceptions.h @endlink
- @link vmcore/include/exceptions_int.h @endlink
- @link vmcore/include/ini.h @endlink
- @link vmcore/include/jit_export.h @endlink
- @link vmcore/include/jit_runtime_support_common.h @endlink
- @link vmcore/include/mon_enter_exit.h @endlink
- @link vmcore/src/util/linux/include/platform.h @endlink
- @link vmcore/src/util/win/include/platform.h @endlink
- @link vmcore/src/util/linux/include/platform_lowlevel.h @endlink
- @link vmcore/src/util/win/include/platform_lowlevel.h @endlink
- @link vmcore/include/stack_trace.h @endlink
- @link vmcore/include/thread_generic.h @endlink
- @link vmcore/include/thread_manager.h @endlink
- @link vmcore/include/vm_arrays.h @endlink
- @link vmcore/include/vm_core_types.h @endlink
- @link vmcore/include/vm_strings.h @endlink
- @link vmcore/include/vm_threads.h @endlink
-
- VM_GC - - @link include/open/vm_gc.h @endlink
- @link include/slot.h @endlink (?)
-
- VM_Thread - - @link include/open/thread_externals.h @endlink -
- JNI - - -

@link include/jni_types.h @endlink
- @link include/jni.h
@endlink

-
- JVMTI - - -

@link include/jvmti.h @endlink
- @link include/jvmti_support.h @endlink
- @link include/jvmti_types.h @endlink

-
- Kernel classes - @link include/open/vm_kernel_classes.h @endlink
- Execution manager - - em - - EM Common - - -

- @link include/open/em.h @endlink

-
- EM_VM - -

@link include/open/em_vm.h @endlink

-
- EM_JIT - - - @link include/open/em_profile_access.h @endlink - -
- Thread manager - - thread - - TM_VM - - -

@link include/open/jthread.h @endlink
- @link include/open/ti_thread.h @endlink

-
- TM_GC - - -

@link include/open/hycomp.h @endlink
- @link include/open/hythread.h @endlink
- @link include/open/hythread_ext.h @endlink

-
- Thread helpers - - @link include/open/thread_helpers.h @endlink -
- Garbage collector - - gc - - GC Generic - - @link include/open/gc.h @endlink -
- Execution engine - - ee - - JIT_VM - - @link vmcore/include/jit_export.h @endlink
- @link vmcore/include/jit_export_jpda.h @endlink
- @link vmcore/include/jit_export_rt.h @endlink
- @link include/internal_jit_intf.h @endlink
-
JIT_EM - - - @link include/open/ee_em_intf.h @endlink - -
- Interpreter - - @link include/interpreter.h
- @link include/interpreter_exports.h @endlink
-
Class library support module - - vmi - VMI - - - "classlib luni module"/hyvmls.h
- "classlib luni module"/vmi.h -
-
- OS portability layer - - port - - APR extension - - port/... .h (40 files) -
- Component manager - -

@link include/open/compmgr.h @endlink
- @link include/component_manager.h @endlink

-
-*/ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @author Andrey Yakushev - */ - -/** \mainpage DRLVM Interfaces -

- The following table maps the DRLVM component structure described in - DRLVM Developers Guide to the directory structure. Click on component - name to see its description. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Component - Prefix - Interfaces - Header files -
- VM core - - vm - - VM Common - - @link include/open/vm.h @endlink
- @link include/open/bytecodes.h @endlink
- @link include/open/common.h @endlink
- @link include/open/vm_util.h @endlink
- @link include/open/types.h @endlink -
-
- VM_JIT - - - @link include/jit_import.h @endlink
- @link include/jit_import_rt.h @endlink
- @link include/jit_runtime_support.h @endlink
- @link vmcore/src/util/linux/include/platform.h @endlink
- @link vmcore/src/util/win/include/platform.h @endlink

-
-
- VM_EM - - -

@link vmcore/include/ini.h @endlink

-
-
- VM_Interpreter - - @link include/interpreter_imports.h @endlink
- @link vmcore/include/Class.h @endlink
- @link vmcore/include/compile.h @endlink
- @link vmcore/include/environment.h @endlink
- @link vmcore/include/exceptions.h @endlink
- @link vmcore/include/exceptions_int.h @endlink
- @link vmcore/include/ini.h @endlink
- @link vmcore/include/jit_export.h @endlink
- @link vmcore/include/jit_runtime_support_common.h @endlink
- @link vmcore/include/mon_enter_exit.h @endlink
- @link vmcore/src/util/linux/include/platform.h @endlink
- @link vmcore/src/util/win/include/platform.h @endlink
- @link vmcore/src/util/linux/include/platform_lowlevel.h @endlink
- @link vmcore/src/util/win/include/platform_lowlevel.h @endlink
- @link vmcore/include/stack_trace.h @endlink
- @link vmcore/include/thread_generic.h @endlink
- @link vmcore/include/thread_manager.h @endlink
- @link vmcore/include/vm_arrays.h @endlink
- @link vmcore/include/vm_core_types.h @endlink
- @link vmcore/include/vm_strings.h @endlink
- @link vmcore/include/vm_threads.h @endlink
-
- VM_GC - - @link include/open/vm_gc.h @endlink
- @link include/slot.h @endlink (?)
-
- VM_Thread - - @link include/open/thread_externals.h @endlink -
- JNI - - -

@link include/jni_types.h @endlink
- @link include/jni.h
@endlink

-
- JVMTI - - -

@link include/jvmti.h @endlink
- @link include/jvmti_support.h @endlink
- @link include/jvmti_types.h @endlink

-
- Kernel classes - @link include/open/vm_kernel_classes.h @endlink
- Execution manager - - em - - EM Common - - -

- @link include/open/em.h @endlink

-
- EM_VM - -

@link include/open/em_vm.h @endlink

-
- EM_JIT - - - @link include/open/em_profile_access.h @endlink - -
- Thread manager - - thread - - TM_VM - - -

@link include/open/jthread.h @endlink
- @link include/open/ti_thread.h @endlink

-
- TM_GC - - -

@link include/open/hycomp.h @endlink
- @link include/open/hythread.h @endlink
- @link include/open/hythread_ext.h @endlink

-
- Thread helpers - - @link include/open/thread_helpers.h @endlink -
- Garbage collector - - gc - - GC Generic - - @link include/open/gc.h @endlink -
- Execution engine - - ee - - JIT_VM - - @link vmcore/include/jit_export.h @endlink
- @link vmcore/include/jit_export_jpda.h @endlink
- @link vmcore/include/jit_export_rt.h @endlink
- @link include/internal_jit_intf.h @endlink
-
JIT_EM - - - @link include/open/ee_em_intf.h @endlink - -
- Interpreter - - @link include/interpreter.h
- @link include/interpreter_exports.h @endlink
-
Class library support module - - vmi - VMI - - - "classlib luni module"/hyvmls.h
- "classlib luni module"/vmi.h -
-
- OS portability layer - - port - - APR extension - - port/... .h (40 files) -
- Component manager - -

@link include/open/compmgr.h @endlink
- @link include/component_manager.h @endlink

-
-*/ Index: vm/port/include/port_dso.h =================================================================== --- vm/port/include/port_dso.h (revision 507428) +++ vm/port/include/port_dso.h (working copy) @@ -22,32 +22,66 @@ #ifndef _PORT_DSO_H_ #define _PORT_DSO_H_ +/** +* @file +* Dynamic binaries handling +*/ + #include "open/types.h" #include "port_general.h" #include #include +/** + * @defgroup port_dso Dynamic binaries handling + * @ingroup port_apr + * @{ + */ + #ifdef __cplusplus extern "C" { #endif /** - * Decorate shared library name (.dll <-> lib*.so). + * Decorates shared library name (.dll <-> lib*.so). * The "name" parameter should be double-quoted string. - * @non_apr */ +#ifdef DOXYGEN +#define PORT_DSO_NAME(name) +#endif + #ifdef PLATFORM_POSIX # define PORT_DSO_NAME(name) "lib" name ".so" #elif PLATFORM_NT # define PORT_DSO_NAME(name) name ".dll" #endif +/** + * @defgroup dso_modes Shared library binding modes + * @{ + */ +/** The APR-default binding mode flag (?) */ #define PORT_DSO_DEFAULT 0 +/** +* Eager mode flag: the resolution/relocation of dynamic symbols should +* be performed at library loading +*/ #define PORT_DSO_BIND_NOW 0x1 +/** +* Lazy mode flag: the resolution/relocation of dynamic symbols should +* be deferred until reference to the symbol encountered. +*/ #define PORT_DSO_BIND_DEFER 0x2 +/** @} */ /** * Loads shared binary (executable or library). +* @param[out] handle - a handle to the loaded object +* @param path - path to the binary +* @param mode - flag to control resolution/relocation of dynamic symbols in + the loaded object, see PORT_DSO_BIND_* defines. +* @param pool - storage to allocate the returned handle +* @return APR_SUCCESS if OK, error code otherwise */ APR_DECLARE(apr_status_t) port_dso_load_ex(apr_dso_handle_t** handle, const char* path, @@ -56,18 +90,25 @@ /** -* Returns list of directories in which OS searches for libraries. +* Returns list of directories in which the OS searches for libraries. +* @param[out] path - pointer to the path list +* @param pool - storage to allocate the returned buffer +* @return APR_SUCCESS if OK, error code otherwise */ APR_DECLARE(apr_status_t) port_dso_search_path(char** path, apr_pool_t* pool); /** - * Decorate shared library name (.dll <-> lib*.so). - * @non_apr + * Decorates shared library name (.dll <-> lib*.so). + * @param dl_name - the name of the shared library + * @param pool - storage to allocate the returned handle + * @return The platform-specific filename for the library */ APR_DECLARE(char *) port_dso_name_decorate(const char* dl_name, apr_pool_t* pool); +/** @} */ + #ifdef __cplusplus } #endif Index: vm/port/include/port_sysinfo.h =================================================================== --- vm/port/include/port_sysinfo.h (revision 507428) +++ vm/port/include/port_sysinfo.h (working copy) @@ -22,6 +22,12 @@ #ifndef _PORT_SYSINFO_H_ #define _PORT_SYSINFO_H_ +/** +* @file +* System information routines +* +*/ + #include "open/types.h" #include "port_general.h" #include @@ -29,9 +35,17 @@ #ifdef __cplusplus extern "C" { #endif +/** + * @defgroup port_sysinfo System information routines + * @ingroup port_apr + * @{ + */ /** * Determines absolute path of the executing process. + * @param[out] self_name - pointer to the requested path string + * @param pool - a pool to allocate return buffer + * @return APR_SUCCESS if OK, error code otherwise */ APR_DECLARE(apr_status_t) port_executable_name(char** self_name, apr_pool_t* pool); @@ -47,29 +61,46 @@ APR_DECLARE(const char *) port_CPU_architecture(void); /** -* Returns OS name and version. +* Provides name and version of the host operating system. +* @param[out] os_name - pointer to the OS name string +* @param[out] os_ver - pointer to the OS version string +* @param pool - a pool to allocate return buffers +* @return APR_SUCCESS if OK, error code otherwise */ APR_DECLARE(apr_status_t) port_OS_name_version(char** os_name, char** os_ver, apr_pool_t* pool); /** -* Returns name of active account. +* Returns a name of the account, under which the current process is executed. +* @param[out] account - pointer to the requested name string +* @param pool - a pool to allocate return buffer +* @return APR_SUCCESS if OK, error code otherwise */ APR_DECLARE(apr_status_t) port_user_name(char** account, apr_pool_t* pool); /** -* Returns home path of active account. +* Returns home path of the account, under which the process is executed. +* @param[out] path - pointer to the requested path string +* @param pool - a pool to allocate return buffer +* @return APR_SUCCESS if OK, error code otherwise */ APR_DECLARE(apr_status_t) port_user_home(char** path, apr_pool_t* pool); /** - * Returns name of current system time zone. + * Returns name of current system time zone. Time zone names are defined + * in the tz database, see ftp://elsie.nci.nih.gov/pub/. + * @param[out] tzname - pointer to the name string + * @param pool - a pool to allocate return buffer + * @return APR_SUCCESS if OK, error code otherwise */ APR_DECLARE(apr_status_t) port_user_timezone(char** tzname, apr_pool_t* pool); +/** @} */ + + #ifdef __cplusplus } #endif Index: vm/port/include/port_filepath.h =================================================================== --- vm/port/include/port_filepath.h (revision 507428) +++ vm/port/include/port_filepath.h (working copy) @@ -22,17 +22,40 @@ #ifndef _PORT_FILEPATH_H_ #define _PORT_FILEPATH_H_ +/** +* @file +* Filepath manipulation routines +* +*/ + #include "port_general.h" #include #ifdef __cplusplus extern "C" { #endif +/** + * @defgroup port_filepath Filepath manipulation routines + * @ingroup port_apr + * @{ + */ /** - * File system separators definitions. - * @non_apr + * @defgroup file_sep File system separators definitions. + * @{ */ +#ifdef DOXYGEN +/** The platform-specific file name separator char, delimiting entities in a filepath. */ +#define PORT_FILE_SEPARATOR +/** The platform-specific file path separator char, delimiting filepaths in a path list */ +#define PORT_PATH_SEPARATOR +/** The platform-specific file name separator, as string */ +#define PORT_FILE_SEPARATOR_STR +/** The platform-specific file name separator, as string */ +#define PORT_PATH_SEPARATOR_STR +#endif +/** @} */ + #ifdef PLATFORM_POSIX # define PORT_FILE_SEPARATOR '/' # define PORT_PATH_SEPARATOR ':' @@ -44,9 +67,13 @@ # define PORT_FILE_SEPARATOR_STR "\\" # define PORT_PATH_SEPARATOR_STR ";" #endif + /** -* Sticks together filepath parts. -* @non_apr +* Sticks together filepath parts, delimiting them by a platform-specific file separator. +* Typical example is obtaining a path to file, given the directory path and the file name. +* @param root - beginning of the file path +* @param trail - ending of the file path +* @return The resulting filepath */ APR_DECLARE(char *) port_filepath_merge(const char* root, const char* trail, @@ -54,12 +81,21 @@ /** -* Returns canonical form of the specified path. -* @non_apr +* Provides canonical form of the specified path. In other words, +* returns the standardized absolute path to a resource, which can be addressed +* via different file paths. The canonical form is reasonable to use as a resource identifier. +* @note However, the canonical form cannot be guaranteed to be sole unique name, +* due to various file systems peculiarities. +* @param original - a path to be canonicalized +* @param pool - a pool to allocate return buffer +* @return The canonical name of the specified path */ APR_DECLARE(char*) port_filepath_canonical(const char* original, apr_pool_t* pool); +/** @} */ + + #ifdef __cplusplus } #endif Index: vm/port/include/port_vmem.h =================================================================== --- vm/port/include/port_vmem.h (revision 507428) +++ vm/port/include/port_vmem.h (working copy) @@ -21,6 +21,13 @@ #ifndef _PORT_VMEM_H_ #define _PORT_VMEM_H_ +/** + * @file + * Virtual memory support + * + * Functions to manipulate memory pages in virtual address space: + * reserve, de/commit, free, control size and access protection of pages. + */ #include "port_general.h" #include @@ -28,34 +35,60 @@ #ifdef __cplusplus extern "C" { #endif +/** @defgroup port_apr Portability layer */ +/** + * @defgroup port_vmem Virtual memory support + * @ingroup port_apr + * @{ + */ + +/** + * @defgroup vmem_protection Memory protection flags + * @{ + */ +/** Enables read access to committed memory region */ #define PORT_VMEM_MODE_READ 0x1 +/** Enables write access to committed memory region */ #define PORT_VMEM_MODE_WRITE 0x2 +/** Enables read access to committed memory region */ #define PORT_VMEM_MODE_EXECUTE 0x4 +/** @} */ +/** + * @defgroup vmem_size Memory page size directives + * These defines may be used instead of explicit calls to port_vmem_page_sizes() + * @{ + */ +/** System default page size */ #define PORT_VMEM_PAGESIZE_DEFAULT 0 +/** Large page (if supported by system) */ #define PORT_VMEM_PAGESIZE_LARGE 1 +/** @} */ /** - * Virtual memory block descriptor. Incomplete type, + * Virtual memory block descriptor. This is incomplete type, * runtime instance should be obtained via port_vmem_reserve() call */ typedef struct port_vmem_t port_vmem_t; /** * Reserves a continuous memory region in the virtual address space - * of the calling process. - * @param[in,out] block descriptor for the reserved memory, required for - * further operations with the memory - * @param[in,out] address starting address of the region to allocate. If null, - * system will determine appropriate location. Actual allocated address is - * returned on success - * @param amount size of the region in bytes. For large pages, size must be - * multiply of page size. See port_vmem_page_sizes() - * @param protectionMode bit mask of PORT_VMEM_MODE_* values - * @param pageSize desired size of memory page. Value should be either - * any of PORT_VMEM_PAGESIZE_* flags or actual size in bytes. - * @param pool auxiliary pool + * of the calling process. + * @param[out] block - descriptor for the reserved memory, required for + * any further operations with the memory + * @param[in,out] address - desired starting address of the region to allocate. If null, + * system will determine appropriate location. + * Actual allocated address is returned on success + * @param amount - size of the region in bytes. For large pages, size must be + * multiply of page size. + * @param protectionMode - bit mask of PORT_VMEM_MODE_* flags + * @param pageSize - desired size of memory page. Value should be either + * PORT_VMEM_PAGESIZE_DEFAULT, PORT_VMEM_PAGESIZE_LARGE + * or actual size in bytes. + * See port_vmem_page_sizes() + * @param pool - auxiliary pool (to allocate the descriptor data, etc) + * @return APR_SUCCESS if OK, error code otherwise */ APR_DECLARE(apr_status_t) port_vmem_reserve(port_vmem_t **block, void **address, size_t amount, @@ -63,11 +96,13 @@ size_t pageSize, apr_pool_t *pool); /** -* Commits (part of) previously reserved memory region. -* @param[in,out] address starting address of the region to commit. Returned value +* Commits (part of) previously reserved memory region. The allocated memory +* is initialized to zero. +* @param[in,out] address - starting address of the region to commit. Returned value * may differ due to page-alignment. -* @param amount size of the region in bytes -* @param block descriptor to the reserved virtual memory +* @param amount - size of the region in bytes +* @param block - descriptor to the reserved virtual memory +* @return APR_SUCCESS if OK, error code otherwise */ APR_DECLARE(apr_status_t) port_vmem_commit(void **address, size_t amount, port_vmem_t *block); @@ -75,6 +110,10 @@ /** * Decommits the specified region of committed memory. It is safe to * decommit reserved (but not committed) region. +* @param address - starting address of the region to decommit +* @param amount - size of the region in bytes +* @param block - memory region descriptor +* @return APR_SUCCESS if OK, error code otherwise */ APR_DECLARE(apr_status_t) port_vmem_decommit(void *address, size_t amount, port_vmem_t *block); @@ -82,9 +121,10 @@ /** * Releases previously reserved virtual memory region as a whole. * If the region was committed, function first decommits it. +* @param block - memory region descriptor +* @return APR_SUCCESS if OK, error code otherwise */ -APR_DECLARE(apr_status_t) port_vmem_release(/*void *address, size_t amount,*/ - port_vmem_t *block); +APR_DECLARE(apr_status_t) port_vmem_release(port_vmem_t *block); /** * Returns zero-terminated array of supported memory page sizes. @@ -94,6 +134,7 @@ */ APR_DECLARE(size_t *) port_vmem_page_sizes(); +/** @} */ #ifdef __cplusplus } Index: vm/port/include/port_atomic.h =================================================================== --- vm/port/include/port_atomic.h (revision 507428) +++ vm/port/include/port_atomic.h (working copy) @@ -22,9 +22,20 @@ #ifndef _PORT_ATOMIC_H_ #define _PORT_ATOMIC_H_ +/** +* @file +* Atomic operations +*/ + #include "open/types.h" #include "port_general.h" +/** + * @defgroup port_atomic Atomic operations + * @ingroup port_apr + * @{ + */ + #ifdef __cplusplus extern "C" { #endif @@ -42,39 +53,50 @@ * thus they are defined as inlined for most platforms in this file */ - #if defined(_IPF_) + #if defined(_IPF_) || defined(DOXYGEN) - -/** -* Atomic compare and exchange operation -* @data[in, out] -* @value[in] new value -* @comp[in] value to compare with -* return old value +/** +* Atomic compare and exchange operation on uint8. +* It compares the current value of the specified data +* with the comp and if they match, swaps the data +* with the value. +* @param[in, out] data - pointer to the value +* @param[in] value - new value +* @param[in] comp - value to compare with +* @return The old value */ APR_DECLARE(uint8) port_atomic_cas8(volatile uint8 * data, uint8 value, uint8 comp); -/** -* Atomic compare and exchange operation -* @data[in, out] -* @value[in] new value -* @comp[in] value to compare with -* return old value +/** +* Atomic compare and exchange operation on uint16. +* It compares the current value of the specified data +* with the comp and if they match, swaps the data +* with the value. +* @param[in, out] data - pointer to the value +* @param[in] value - new value +* @param[in] comp - value to compare with +* @return The old value */ APR_DECLARE(uint16) port_atomic_cas16(volatile uint16 * data, uint16 value, uint16 comp); -/** -* Atomic compare and exchange operation -* @data[in, out] -* @value[in] new value -* @comp[in] value to compare with -* return old value +/** +* Atomic compare and exchange operation on uint64. +* It compares the current value of the specified data +* with the comp and if they match, swaps the data +* with the value. +* @param[in, out] data - pointer to the value +* @param[in] value - new value +* @param[in] comp - value to compare with +* @return The old value */ APR_DECLARE(uint64) port_atomic_cas64(volatile uint64 * data, uint64 value, uint64 comp); +/** @} */ + + #elif defined( WIN32 ) INLINE uint8 port_atomic_cas8(volatile uint8 * data , uint8 value, uint8 comp) { Index: vm/port/include/port_disasm.h =================================================================== --- vm/port/include/port_disasm.h (revision 507428) +++ vm/port/include/port_disasm.h (working copy) @@ -30,6 +30,13 @@ extern "C" { #endif +/** + * @defgroup port_disasm Disassembler of machine codes + * @ingroup port_apr + * @{ + */ + +/** */ typedef struct port_disassembler_t port_disassembler_t; typedef struct port_disasm_info_t { @@ -95,6 +102,9 @@ unsigned int len, apr_file_t * thefile); +/** @} */ + + #ifdef __cplusplus } #endif Index: vm/port/include/port_timer.h =================================================================== --- vm/port/include/port_timer.h (revision 507428) +++ vm/port/include/port_timer.h (working copy) @@ -27,18 +27,34 @@ extern "C" { #endif +/** +* @file +* High resolution timer +*/ + +/** + * @defgroup port_timer High resolution timer + * @ingroup port_apr + * @{ + */ + /** - * High resolution timer, in nanoseconds. + * High resolution timer, in nanoseconds. + * It is not tied to system clocks, rather intended for precise + * measuring of elapsed time intervals. */ typedef apr_int64_t apr_nanotimer_t; /** * Returns the value of the system timer with the best possible accuracy. - * This value is not tied to the absolute time, but intended for precise - * measuring of elapsed time intervals. + * Difference between two subsequent invocations would produce number of + * passed nanoseconds. */ APR_DECLARE(apr_nanotimer_t) port_nanotimer(); +/** @} */ + + #ifdef __cplusplus } #endif Index: vm/doc/doc.properties =================================================================== --- vm/doc/doc.properties (revision 507523) +++ vm/doc/doc.properties (working copy) @@ -51,7 +51,6 @@ port/include/port_atomic.h \ port/include/port_disasm.h \ port/include/port_dso.h \ -port/include/port_env.h \ port/include/port_filepath.h \ port/include/port_general.h \ port/include/port_malloc.h \ @@ -183,7 +182,6 @@ ${jitrino.intf} \ ${port.intf} \ ${thread.intf} \ -${vmcore_abridged.intf} \ ${vmi.intf} \ ${vmstart.intf} @@ -437,12 +435,9 @@ vmcore/src/util/ipf/include/vm_ipf.h \ vmcore/src/util/linux/crash_handler.h \ vmcore/src/util/linux/include/exception_filter.h \ -vmcore/src/util/linux/include/platform.h \ vmcore/src/util/linux/include/platform_lowlevel.h \ vmcore/src/util/linux/include/vm_process.h \ vmcore/src/util/win/include/exception_filter.h \ -vmcore/src/util/win/include/java_lang_thread_nt.h \ -vmcore/src/util/win/include/platform.h \ vmcore/src/util/win/include/platform_lowlevel.h \ vmcore/src/util/win/include/vm_process.h \ vmcore/src/verifier/ver_real.h Index: vm/doc/vm.cfg =================================================================== --- vm/doc/vm.cfg (revision 507523) +++ vm/doc/vm.cfg (working copy) @@ -938,13 +938,13 @@ # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. -MACRO_EXPANSION = NO +MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. -EXPAND_ONLY_PREDEF = NO +EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. @@ -969,6 +969,8 @@ # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. +PREDEFINED = "APR_DECLARE(x)=x" \ + DOXYGEN # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded.