Ignore:
Timestamp:
Mar 15, 2012, 12:08:10 AM (9 years ago)
Author:
sam
Message:

ps3: fix PS3 build after the Queue refactoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/platform/ps3/threadbase.h

    r1101 r1164  
    5353};
    5454
    55 class QueueBase
     55template<typename T, int N> class QueueBase
    5656{
    5757public:
     
    8181    }
    8282
    83     void Push(int value)
     83    void Push(T value)
    8484    {
    8585        /* FIXME: this is a copy of the pthread implementation, but we
     
    9797    }
    9898
    99     int Pop()
     99    T Pop()
    100100    {
    101101        sys_lwmutex_lock(&m_mutex, 0);
     
    104104            sys_lwcond_wait(&m_empty_cond, 0);
    105105        m_poppers--;
    106         int ret = m_values[m_start];
     106        T ret = m_values[m_start];
    107107        m_start = (m_start + 1) % CAPACITY;
    108108        m_count--;
     
    114114
    115115private:
    116     static size_t const CAPACITY = 100;
    117     int m_values[CAPACITY];
     116    static size_t const CAPACITY = N;
     117    T m_values[CAPACITY];
    118118    size_t m_start, m_count;
    119119    size_t m_poppers, m_pushers;
Note: See TracChangeset for help on using the changeset viewer.