mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-01 09:11:29 +00:00
Add new Queue, QueueItem, Queuelist, SBQueue, SBQueueItem classes to represent
libdispatch aka Grand Central Dispatch (GCD) queues. Still fleshing out the documentation and testing of these but the overall API is settling down so it's a good time to check it in. <rdar://problem/15600370> llvm-svn: 197190
This commit is contained in:
1 parent
2af6d73cdf
commit
5e8dce4dbf
30 files changed
+1533
-3
No files matched your search
@@ -534,6 +534,53 @@ SBProcess::GetThreadAtIndex (size_t index)
|
||||
return sb_thread;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBProcess::GetNumQueues ()
|
||||
{
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
|
||||
uint32_t num_queues = 0;
|
||||
ProcessSP process_sp(GetSP());
|
||||
if (process_sp)
|
||||
{
|
||||
Process::StopLocker stop_locker;
|
||||
|
||||
Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
|
||||
num_queues = process_sp->GetQueueList().GetSize();
|
||||
}
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBProcess(%p)::GetNumQueues () => %d", process_sp.get(), num_queues);
|
||||
|
||||
return num_queues;
|
||||
}
|
||||
|
||||
SBQueue
|
||||
SBProcess::GetQueueAtIndex (size_t index)
|
||||
{
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
|
||||
SBQueue sb_queue;
|
||||
QueueSP queue_sp;
|
||||
ProcessSP process_sp(GetSP());
|
||||
if (process_sp)
|
||||
{
|
||||
Process::StopLocker stop_locker;
|
||||
Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
|
||||
queue_sp = process_sp->GetQueueList().GetQueueAtIndex(index);
|
||||
sb_queue.SetQueue (queue_sp);
|
||||
}
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBProcess(%p)::GetQueueAtIndex (index=%d) => SBQueue(%p)",
|
||||
process_sp.get(), (uint32_t) index, queue_sp.get());
|
||||
}
|
||||
|
||||
return sb_queue;
|
||||
}
|
||||
|
||||
|
||||
uint32_t
|
||||
SBProcess::GetStopID(bool include_expression_stops)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user