Ignore:
Timestamp:
Feb 26, 2013, 2:43:45 PM (7 years ago)
Author:
sam
Message:

base: start removing occurrences of NULL on our long journey to nullptr.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sys/threadbase.h

    r2238 r2506  
    4040    {
    4141#if defined HAVE_PTHREAD_H
    42         pthread_mutex_init(&m_mutex, NULL);
     42        pthread_mutex_init(&m_mutex, nullptr);
    4343#elif defined _WIN32
    4444        InitializeCriticalSection(&m_mutex);
     
    8989#if defined HAVE_PTHREAD_H
    9090        m_poppers = m_pushers = 0;
    91         pthread_mutex_init(&m_mutex, NULL);
    92         pthread_cond_init(&m_empty_cond, NULL);
    93         pthread_cond_init(&m_full_cond, NULL);
    94 #elif defined _WIN32
    95         m_empty_sem = CreateSemaphore(NULL, CAPACITY, CAPACITY, NULL);
    96         m_full_sem = CreateSemaphore(NULL, 0, CAPACITY, NULL);
     91        pthread_mutex_init(&m_mutex, nullptr);
     92        pthread_cond_init(&m_empty_cond, nullptr);
     93        pthread_cond_init(&m_full_cond, nullptr);
     94#elif defined _WIN32
     95        m_empty_sem = CreateSemaphore(nullptr, CAPACITY, CAPACITY, nullptr);
     96        m_full_sem = CreateSemaphore(nullptr, 0, CAPACITY, nullptr);
    9797        InitializeCriticalSection(&m_mutex);
    9898#endif
     
    137137#elif defined _WIN32
    138138        LeaveCriticalSection(&m_mutex);
    139         ReleaseSemaphore(m_full_sem, 1, NULL);
     139        ReleaseSemaphore(m_full_sem, 1, nullptr);
    140140#endif
    141141    }
     
    169169#else
    170170        LeaveCriticalSection(&m_mutex);
    171         ReleaseSemaphore(m_empty_sem, 1, NULL);
     171        ReleaseSemaphore(m_empty_sem, 1, nullptr);
    172172#endif
    173173
     
    201201        pthread_create(&m_thread, &attr, fn, data);
    202202#elif defined _WIN32
    203         m_thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)fn,
     203        m_thread = CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)fn,
    204204                                data, 0, &m_tid);
    205205#endif
     
    209209    {
    210210#if defined HAVE_PTHREAD_H
    211         pthread_join(m_thread, NULL);
     211        pthread_join(m_thread, nullptr);
    212212#elif defined _WIN32
    213213        WaitForSingleObject(m_thread, INFINITE);
Note: See TracChangeset for help on using the changeset viewer.