VirtualBox

Changeset 36555 in vbox for trunk/src/VBox/Runtime/include


Ignore:
Timestamp:
Apr 5, 2011 12:34:09 PM (14 years ago)
Author:
vboxsync
Message:

Use DECLHIDDEN, especially in IPRT.

Location:
trunk/src/VBox/Runtime/include/internal
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/assert.h

    r28800 r36555  
    4343 * @param   pszFunction Location function name.
    4444 */
    45 void rtR0AssertNativeMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction);
     45DECLHIDDEN(void) rtR0AssertNativeMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction);
    4646
    4747/**
     
    5454 * @param   va          Arguments to that string.
    5555 */
    56 void rtR0AssertNativeMsg2V(bool fInitial, const char *pszFormat, va_list va);
     56DECLHIDDEN(void) rtR0AssertNativeMsg2V(bool fInitial, const char *pszFormat, va_list va);
    5757
    5858#endif
  • trunk/src/VBox/Runtime/include/internal/initterm.h

    r33540 r36555  
    3939 * @returns IPRT status code.
    4040 */
    41 int rtR0InitNative(void);
     41DECLHIDDEN(int) rtR0InitNative(void);
    4242
    4343/**
    4444 * Platform specific termination.
    4545 */
    46 void rtR0TermNative(void);
     46DECLHIDDEN(void) rtR0TermNative(void);
    4747
    4848#endif /* IN_RING0 */
  • trunk/src/VBox/Runtime/include/internal/memobj.h

    r33540 r36555  
    1 /* $Revision$ */
     1/* $Id$ */
    22/** @file
    33 * IPRT - Ring-0 Memory Objects.
     
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2011 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    288288 * @param   pMem        The ring-0 memory object handle to the memory which should be freed.
    289289 */
    290 int rtR0MemObjNativeFree(PRTR0MEMOBJINTERNAL pMem);
     290DECLHIDDEN(int) rtR0MemObjNativeFree(PRTR0MEMOBJINTERNAL pMem);
    291291
    292292/**
     
    300300 * @param   fExecutable     Flag indicating whether it should be permitted to executed code in the memory object.
    301301 */
    302 int rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable);
     302DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable);
    303303
    304304/**
     
    312312 * @param   fExecutable     Flag indicating whether it should be permitted to executed code in the memory object.
    313313 */
    314 int rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable);
     314DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable);
    315315
    316316/**
     
    324324 * @param   fExecutable     Flag indicating whether it should be permitted to executed code in the memory object.
    325325 */
    326 int rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable);
     326DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable);
    327327
    328328/**
     
    337337 * @param   R0Process       The process to lock pages in.
    338338 */
    339 int rtR0MemObjNativeLockUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3Ptr, size_t cb, uint32_t fAccess, RTR0PROCESS R0Process);
     339DECLHIDDEN(int) rtR0MemObjNativeLockUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3Ptr, size_t cb, uint32_t fAccess, RTR0PROCESS R0Process);
    340340
    341341/**
     
    349349 *                          and RTMEM_PROT_WRITE.
    350350 */
    351 int rtR0MemObjNativeLockKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pv, size_t cb, uint32_t fAccess);
     351DECLHIDDEN(int) rtR0MemObjNativeLockKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pv, size_t cb, uint32_t fAccess);
    352352
    353353/**
     
    363363 *                          Supported values are PAGE_SIZE, _2M, _4M and _1G.
    364364 */
    365 int rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment);
     365DECLHIDDEN(int) rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment);
    366366
    367367/**
     
    376376 *                          NIL_RTHCPHYS if any address is acceptable.
    377377 */
    378 int rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest);
     378DECLHIDDEN(int) rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest);
    379379
    380380/**
     
    387387 * @param   uCachePolicy    One of the RTMEM_CACHE_XXX modes.
    388388 */
    389 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy);
     389DECLHIDDEN(int) rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy);
    390390
    391391/**
     
    399399 * @param   uAlignment      The alignment of the reserved memory; PAGE_SIZE, _2M or _4M.
    400400 */
    401 int rtR0MemObjNativeReserveKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment);
     401DECLHIDDEN(int) rtR0MemObjNativeReserveKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment);
    402402
    403403/**
     
    411411 * @param   R0Process       The process to reserve the memory in.
    412412 */
    413 int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process);
     413DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process);
    414414
    415415/**
     
    431431 *                          page aligned.
    432432 */
    433 int rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment,
    434                               unsigned fProt, size_t offSub, size_t cbSub);
     433DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment,
     434                                          unsigned fProt, size_t offSub, size_t cbSub);
    435435
    436436/**
     
    445445 * @param   R0Process       The process to map the memory into.
    446446 */
    447 int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, PRTR0MEMOBJINTERNAL pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process);
     447DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, PRTR0MEMOBJINTERNAL pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process);
    448448
    449449/**
     
    459459 * @param   fProt           Combination of RTMEM_PROT_* flags.
    460460 */
    461 int rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt);
     461DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt);
    462462
    463463/**
     
    471471 * @param   iPage           The page number within the object (valid).
    472472 */
    473 RTHCPHYS rtR0MemObjNativeGetPagePhysAddr(PRTR0MEMOBJINTERNAL pMem, size_t iPage);
    474 
    475 PRTR0MEMOBJINTERNAL rtR0MemObjNew(size_t cbSelf, RTR0MEMOBJTYPE enmType, void *pv, size_t cb);
    476 void rtR0MemObjDelete(PRTR0MEMOBJINTERNAL pMem);
     473DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(PRTR0MEMOBJINTERNAL pMem, size_t iPage);
     474
     475DECLHIDDEN(PRTR0MEMOBJINTERNAL) rtR0MemObjNew(size_t cbSelf, RTR0MEMOBJTYPE enmType, void *pv, size_t cb);
     476DECLHIDDEN(void) rtR0MemObjDelete(PRTR0MEMOBJINTERNAL pMem);
    477477
    478478/** @} */
  • trunk/src/VBox/Runtime/include/internal/process.h

    r36549 r36555  
    5050 * @remark  Located in sched.
    5151 */
    52 int rtProcNativeSetPriority(RTPROCPRIORITY enmPriority);
     52DECLHIDDEN(int) rtProcNativeSetPriority(RTPROCPRIORITY enmPriority);
    5353
    5454/**
  • trunk/src/VBox/Runtime/include/internal/rand.h

    r33540 r36555  
    159159RT_C_DECLS_BEGIN
    160160
    161 /**
    162  * Initialize OS facilities for generating random bytes.
    163  */
    164 void rtRandLazyInitNative(void);
    165 
    166 /**
    167  * Generate random bytes using OS facilities.
    168  *
    169  * @returns VINF_SUCCESS on success, some error status code on failure.
    170  * @param   pv      Where to store the random bytes.
    171  * @param   cb      How many random bytes to store.
    172  */
    173 int rtRandGenBytesNative(void *pv, size_t cb);
    174 
    175 void rtRandGenBytesFallback(void *pv, size_t cb) RT_NO_THROW;
    176 
    177 DECLCALLBACK(void)      rtRandAdvSynthesizeBytesFromU32(PRTRANDINT pThis, uint8_t *pb, size_t cb);
    178 DECLCALLBACK(void)      rtRandAdvSynthesizeBytesFromU64(PRTRANDINT pThis, uint8_t *pb, size_t cb);
    179 DECLCALLBACK(uint32_t)  rtRandAdvSynthesizeU32FromBytes(PRTRANDINT pThis, uint32_t u32First, uint32_t u32Last);
    180 DECLCALLBACK(uint32_t)  rtRandAdvSynthesizeU32FromU64(PRTRANDINT pThis, uint32_t u32First, uint32_t u32Last);
    181 DECLCALLBACK(uint64_t)  rtRandAdvSynthesizeU64FromBytes(PRTRANDINT pThis, uint64_t u64First, uint64_t u64Last);
    182 DECLCALLBACK(uint64_t)  rtRandAdvSynthesizeU64FromU32(PRTRANDINT pThis, uint64_t u64First, uint64_t u64Last);
    183 DECLCALLBACK(int)       rtRandAdvStubSeed(PRTRANDINT pThis, uint64_t u64Seed);
    184 DECLCALLBACK(int)       rtRandAdvStubSaveState(PRTRANDINT pThis, char *pszState, size_t *pcbState);
    185 DECLCALLBACK(int)       rtRandAdvStubRestoreState(PRTRANDINT pThis, char const *pszState);
    186 DECLCALLBACK(int)       rtRandAdvDefaultDestroy(PRTRANDINT pThis);
     161DECLHIDDEN(DECLCALLBACK(void))      rtRandAdvSynthesizeBytesFromU32(PRTRANDINT pThis, uint8_t *pb, size_t cb);
     162DECLHIDDEN(DECLCALLBACK(void))      rtRandAdvSynthesizeBytesFromU64(PRTRANDINT pThis, uint8_t *pb, size_t cb);
     163DECLHIDDEN(DECLCALLBACK(uint32_t))  rtRandAdvSynthesizeU32FromBytes(PRTRANDINT pThis, uint32_t u32First, uint32_t u32Last);
     164DECLHIDDEN(DECLCALLBACK(uint32_t))  rtRandAdvSynthesizeU32FromU64(PRTRANDINT pThis, uint32_t u32First, uint32_t u32Last);
     165DECLHIDDEN(DECLCALLBACK(uint64_t))  rtRandAdvSynthesizeU64FromBytes(PRTRANDINT pThis, uint64_t u64First, uint64_t u64Last);
     166DECLHIDDEN(DECLCALLBACK(uint64_t))  rtRandAdvSynthesizeU64FromU32(PRTRANDINT pThis, uint64_t u64First, uint64_t u64Last);
     167DECLHIDDEN(DECLCALLBACK(int))       rtRandAdvStubSeed(PRTRANDINT pThis, uint64_t u64Seed);
     168DECLHIDDEN(DECLCALLBACK(int))       rtRandAdvStubSaveState(PRTRANDINT pThis, char *pszState, size_t *pcbState);
     169DECLHIDDEN(DECLCALLBACK(int))       rtRandAdvStubRestoreState(PRTRANDINT pThis, char const *pszState);
     170DECLHIDDEN(DECLCALLBACK(int))       rtRandAdvDefaultDestroy(PRTRANDINT pThis);
    187171
    188172RT_C_DECLS_END
  • trunk/src/VBox/Runtime/include/internal/sched.h

    r28800 r36555  
    4141 * @param   enmType     The thread type to be assumed for the current thread.
    4242 */
    43 int rtSchedNativeCalcDefaultPriority(RTTHREADTYPE enmType);
     43DECLHIDDEN(int) rtSchedNativeCalcDefaultPriority(RTTHREADTYPE enmType);
    4444
    4545RT_C_DECLS_END
  • trunk/src/VBox/Runtime/include/internal/string.h

    r28903 r36555  
    4848#endif
    4949
    50 size_t rtstrFormatRt(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, const char **ppszFormat, va_list *pArgs,
    51                      int cchWidth, int cchPrecision, unsigned fFlags, char chArgSize);
    52 size_t rtstrFormatType(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, const char **ppszFormat, va_list *pArgs,
    53                        int cchWidth, int cchPrecision, unsigned fFlags, char chArgSize);
     50DECLHIDDEN(size_t) rtstrFormatRt(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, const char **ppszFormat, va_list *pArgs,
     51                                 int cchWidth, int cchPrecision, unsigned fFlags, char chArgSize);
     52DECLHIDDEN(size_t) rtstrFormatType(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, const char **ppszFormat, va_list *pArgs,
     53                                   int cchWidth, int cchPrecision, unsigned fFlags, char chArgSize);
    5454
    5555#ifdef RT_WITH_ICONV_CACHE
    56 void rtStrIconvCacheInit(struct RTTHREADINT *pThread);
    57 void rtStrIconvCacheDestroy(struct RTTHREADINT *pThread);
     56DECLHIDDEN(void) rtStrIconvCacheInit(struct RTTHREADINT *pThread);
     57DECLHIDDEN(void) rtStrIconvCacheDestroy(struct RTTHREADINT *pThread);
    5858#endif
    5959
     
    7575} RTSTRICONV;
    7676
    77 int rtStrConvert(const char *pchInput, size_t cchInput, const char *pszInputCS,
    78                  char **ppszOutput, size_t cbOutput, const char *pszOutputCS,
    79                  unsigned cFactor, RTSTRICONV enmCacheIdx);
    80 const char *rtStrGetLocaleCodeset(void);
    81 int rtUtf8Length(const char *psz, size_t cch, size_t *pcuc, size_t *pcchActual);
     77DECLHIDDEN(int) rtStrConvert(const char *pchInput, size_t cchInput, const char *pszInputCS,
     78                             char **ppszOutput, size_t cbOutput, const char *pszOutputCS,
     79                             unsigned cFactor, RTSTRICONV enmCacheIdx);
     80DECLHIDDEN(const char *) rtStrGetLocaleCodeset(void);
     81DECLHIDDEN(int) rtUtf8Length(const char *psz, size_t cch, size_t *pcuc, size_t *pcchActual);
    8282
    8383RT_C_DECLS_END
  • trunk/src/VBox/Runtime/include/internal/thread.h

    r34256 r36555  
    138138 * @returns iprt status code.
    139139 */
    140 int rtThreadNativeInit(void);
     140DECLHIDDEN(int) rtThreadNativeInit(void);
    141141
    142142/**
     
    148148 * @param   pNativeThread   Where to store the native thread identifier.
    149149 */
    150 int rtThreadNativeCreate(PRTTHREADINT pThreadInt, PRTNATIVETHREAD pNativeThread);
     150DECLHIDDEN(int) rtThreadNativeCreate(PRTTHREADINT pThreadInt, PRTNATIVETHREAD pNativeThread);
    151151
    152152/**
     
    156156 * @param   pThread     Pointer to the thread structure.
    157157 */
    158 int rtThreadNativeAdopt(PRTTHREADINT pThread);
     158DECLHIDDEN(int) rtThreadNativeAdopt(PRTTHREADINT pThread);
    159159
    160160/**
     
    164164 * @param   pThread         The thread structure.
    165165 */
    166 void rtThreadNativeDestroy(PRTTHREADINT pThread);
     166DECLHIDDEN(void) rtThreadNativeDestroy(PRTTHREADINT pThread);
    167167
    168168/**
     
    178178 * @remark  Located in sched.
    179179 */
    180 int rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enmType);
     180DECLHIDDEN(int) rtThreadNativeSetPriority(PRTTHREADINT pThread, RTTHREADTYPE enmType);
    181181
    182182#ifdef IN_RING3
     
    188188 * threads properly.
    189189 */
    190 void rtThreadNativeDetach(void);
     190DECLHIDDEN(void) rtThreadNativeDetach(void);
    191191# endif
    192192#endif /* !IN_RING0 */
     
    194194
    195195/* thread.cpp */
    196 int          rtThreadMain(PRTTHREADINT pThread, RTNATIVETHREAD NativeThread, const char *pszThreadName);
    197 void         rtThreadBlocking(PRTTHREADINT pThread, RTTHREADSTATE enmState, uint64_t u64Block,
    198                               const char *pszFile, unsigned uLine, RTUINTPTR uId);
    199 void         rtThreadUnblocked(PRTTHREADINT pThread, RTTHREADSTATE enmCurState);
    200 uint32_t     rtThreadRelease(PRTTHREADINT pThread);
    201 void         rtThreadTerminate(PRTTHREADINT pThread, int rc);
    202 PRTTHREADINT rtThreadGetByNative(RTNATIVETHREAD NativeThread);
    203 PRTTHREADINT rtThreadGet(RTTHREAD Thread);
    204 int          rtThreadInit(void);
    205 void         rtThreadTerm(void);
    206 void         rtThreadInsert(PRTTHREADINT pThread, RTNATIVETHREAD NativeThread);
    207 #ifdef IN_RING3
    208 int          rtThreadDoSetProcPriority(RTPROCPRIORITY enmPriority);
     196DECLHIDDEN(int)          rtThreadMain(PRTTHREADINT pThread, RTNATIVETHREAD NativeThread, const char *pszThreadName);
     197DECLHIDDEN(uint32_t)     rtThreadRelease(PRTTHREADINT pThread);
     198DECLHIDDEN(void)         rtThreadTerminate(PRTTHREADINT pThread, int rc);
     199DECLHIDDEN(PRTTHREADINT) rtThreadGetByNative(RTNATIVETHREAD NativeThread);
     200DECLHIDDEN(PRTTHREADINT) rtThreadGet(RTTHREAD Thread);
     201DECLHIDDEN(int)          rtThreadInit(void);
     202DECLHIDDEN(void)         rtThreadTerm(void);
     203DECLHIDDEN(void)         rtThreadInsert(PRTTHREADINT pThread, RTNATIVETHREAD NativeThread);
     204#ifdef IN_RING3
     205DECLHIDDEN(int)          rtThreadDoSetProcPriority(RTPROCPRIORITY enmPriority);
    209206#endif /* !IN_RING0 */
    210207#ifdef IPRT_WITH_GENERIC_TLS
    211 void         rtThreadClearTlsEntry(RTTLS iTls);
    212 void         rtThreadTlsDestruction(PRTTHREADINT pThread); /* in tls-generic.cpp */
     208DECLHIDDEN(void)         rtThreadClearTlsEntry(RTTLS iTls);
     209DECLHIDDEN(void)         rtThreadTlsDestruction(PRTTHREADINT pThread); /* in tls-generic.cpp */
    213210#endif
    214211
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette