Signal Fix: Added signal limit to allocSignal

1. Did not change the logic in allocSignal
2. Added guard to wait on signal limit

Change-Id: I78f29097e6a584b3c3d78319dac19869067bd1fe


[ROCm/hip commit: 1859c6e515]
This commit is contained in:
Aditya Atluri
2016-07-27 13:48:49 -05:00
parent 6ff74b7780
commit c2b4a3936c
2 changed files with 14 additions and 2 deletions
+4 -2
View File
@@ -351,7 +351,9 @@ public:
_last_copy_signal(NULL),
_signalCursor(0),
_oldest_live_sig_id(1),
_stream_sig_id(0)
_stream_sig_id(0),
_kernelCnt(0),
_signalCnt(0)
{
_signalPool.resize(HIP_STREAM_SIGNALS > 0 ? HIP_STREAM_SIGNALS : 1);
};
@@ -378,7 +380,7 @@ public:
int _signalCursor;
SIGSEQNUM _oldest_live_sig_id; // oldest live seq_id, anything < this can be allocated.
std::deque<ihipSignal_t> _signalPool; // Pool of signals for use by this stream.
uint32_t _signalCnt;
uint32_t _kernelCnt;
SIGSEQNUM _stream_sig_id; // Monotonically increasing unique signal id.
};