VirtualBox

Changeset 29661 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 19, 2010 2:29:49 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: IPRT_DEBUG_SEMS cleanup - use macros.

Location:
trunk/src/VBox/Runtime/r0drv/linux
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c

    r29648 r29661  
    142142    int     rc       = VINF_SUCCESS;
    143143    long    lTimeout = cMillies == RT_INDEFINITE_WAIT ? MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(cMillies);
    144 #ifdef IPRT_DEBUG_SEMS
    145     snprintf(current->comm, sizeof(current->comm), "e%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
    146 #endif
     144    IPRT_DEBUG_SEMS_STATE(pThis, 'e');
    147145    for (;;)
    148146    {
     
    182180
    183181    finish_wait(&pThis->Head, &Wait);
    184 #ifdef IPRT_DEBUG_SEMS
    185     snprintf(current->comm, sizeof(current->comm), "e%lx:%d", IPRT_DEBUG_SEMS_ADDRESS(pThis), rc);
    186 #endif
     182    IPRT_DEBUG_SEMS_STATE_RC(pThis, 'e', rc);
    187183    return rc;
    188184}
  • trunk/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c

    r29648 r29661  
    166166    int     rc       = VINF_SUCCESS;
    167167    long    lTimeout = cMillies == RT_INDEFINITE_WAIT ? MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(cMillies);
    168 #ifdef IPRT_DEBUG_SEMS
    169     snprintf(current->comm, sizeof(current->comm), "E%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
    170 #endif
     168    IPRT_DEBUG_SEMS_STATE(pThis, 'E');
    171169    for (;;)
    172170    {
     
    206204
    207205    finish_wait(&pThis->Head, &Wait);
    208 #ifdef IPRT_DEBUG_SEMS
    209     snprintf(current->comm, sizeof(current->comm), "E%lx:%d", IPRT_DEBUG_SEMS_ADDRESS(pThis), rc);
    210 #endif
     206    IPRT_DEBUG_SEMS_STATE_RC(pThis, 'E', rc);
    211207    return rc;
    212208}
  • trunk/src/VBox/Runtime/r0drv/linux/semfastmutex-r0drv-linux.c

    r29648 r29661  
    114114    AssertMsgReturn(pThis->u32Magic == RTSEMFASTMUTEX_MAGIC, ("u32Magic=%RX32 pThis=%p\n", pThis->u32Magic, pThis), VERR_INVALID_HANDLE);
    115115
    116 #ifdef IPRT_DEBUG_SEMS
    117     snprintf(current->comm, sizeof(current->comm), "d%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
    118 #endif
     116    IPRT_DEBUG_SEMS_STATE(pThis, 'd');
    119117    down(&pThis->Semaphore);
    120118#ifdef IPRT_DEBUG_SEMS
    121     snprintf(current->comm, sizeof(current->comm), "o%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
     119    IPRT_DEBUG_SEMS_STATE(pThis, 'o');
    122120    AssertRelease(pThis->Owner == NIL_RTNATIVETHREAD);
    123121    ASMAtomicUoWriteSize(&pThis->Owner, RTThreadNativeSelf());
     
    142140#endif
    143141    up(&pThis->Semaphore);
    144 #ifdef IPRT_DEBUG_SEMS
    145     snprintf(current->comm, sizeof(current->comm), "u%lx", IPRT_DEBUG_SEMS_ADDRESS(pThis));
    146 #endif
     142    IPRT_DEBUG_SEMS_STATE(pThis, 'u');
    147143    return VINF_SUCCESS;
    148144}
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