[kernel] Add endpoint object and related syscalls

The endpoint object adds synchronous IPC. Also added the wait-type of
'object' to threads.
This commit is contained in:
2020-09-07 01:09:56 -07:00
parent 53d260cc6e
commit 8534d8d3c5
13 changed files with 368 additions and 49 deletions

View File

@@ -141,6 +141,16 @@ public:
return temp;
}
/// Remove an item from the beginning of the array and return it.
T pop_front()
{
T temp = m_elements[0];
for (size_t i = 1; i < m_size; ++i)
m_elements[i-1] = m_elements[i];
remove();
return temp;
}
/// Set the size of the array. Any new items are default constructed.
/// Any items past the end are deleted. The array is realloced if needed.
/// \arg size The new size