Changeset 228 for trunk/include


Ignore:
Timestamp:
04/18/11 16:25:46 (13 years ago)
Author:
tim
Message:

added a test case for pyregfi multithreaded use
updated the regfi multithreaded test case
fixed several ctypes interface problems in pyregfi
added locking to pyregfi iterators for thread safety
fixed regfi talloc race conditions with an additional lock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/regfi.h

    r226 r228  
    821821  pthread_mutex_t sk_lock;
    822822
     823  /* Needed to protect various talloc calls */
     824  pthread_mutex_t mem_lock;
     825
    823826} REGFI_FILE;
    824827
     
    971974/** Frees a record previously returned by one of the API functions.
    972975 *
    973  * Can be used to free REGFI_NK, REGFI_VK, REGFI_SK, REGFI_DATA, and
    974  * REGFI_CLASSNAME records.
    975  *
    976  * @note The "const" in the data type is a bit misleading and is there just for
     976 * @param file The file from which the record originated. 
     977 *             (This is needed for memory management reasons.)
     978 *
     979 * @param record Any of the following record types: REGFI_NK, REGFI_VK,
     980 *        REGFI_SK, REGFI_DATA, and REGFI_CLASSNAME records.
     981 *
     982 * @note The "const" in the record data type is a bit misleading and is there just for
    977983 * convenience.  Since records returned previously must not be modified by users
    978984 * of the API due to internal caching, these are returned as const, so this
     
    982988 */
    983989_EXPORT
    984 void regfi_free_record(const void* record);
     990void regfi_free_record(REGFI_FILE* file, const void* record);
    985991
    986992
     
    992998 * without requiring them to be in sync with when it is freed.
    993999 *
    994  * Can be used on REGFI_NK, REGFI_VK, REGFI_SK, REGFI_DATA, and
    995  * REGFI_CLASSNAME records.
     1000 * @param file The file from which the record originated. 
     1001 *             (This is needed for memory management reasons.)
     1002 *
     1003 * @param record Any of the following record types: REGFI_NK, REGFI_VK,
     1004 *        REGFI_SK, REGFI_DATA, and REGFI_CLASSNAME records.
    9961005 *
    9971006 * @return true on success, false otherwise
     
    10001009 */
    10011010_EXPORT
    1002 bool regfi_reference_record(const void* record);
     1011bool regfi_reference_record(REGFI_FILE* file, const void* record);
    10031012
    10041013
Note: See TracChangeset for help on using the changeset viewer.