Thread (8 messages) flat view 8 messages, 4 authors, 2017-04-03

Re: How to write RT applications ?

From: Julia Cartwright <hidden>
Date: 2017-03-21 20:18:38

On Tue, Mar 21, 2017 at 01:08:40PM -0400, Brian Wrenn wrote:
I've tried to find a way to use ::std::thread or ::boost::thread to
accomplish what the article for creating a simple RT application with
pthreads does, but unfortunately I don't think those two OOP
approaches provide enough attribute configuration to suffice.  Has
anyone else found otherwise?
There is a defined member function for the std::thread type,
native_thread() which will return the underlying native thread type,
which, if you're using gcc/glibc is most likely the pthread_t.

Alternatively, the thread can adjust its own scheduling properties using
pthread_self().

See: http://en.cppreference.com/w/cpp/thread/thread/native_handle

For an example.

   Julia

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help