Skip to content
Snippets Groups Projects
Commit ccc911b6 authored by Nadav Har'El's avatar Nadav Har'El
Browse files

Condvar: Make thread::tcpu() a const function

thread::tcpu() doesn't change the thread object, so let's mark it const,
so it can be used on const sched::thread objects.

We'll need it in the following patch, when we use it on wait_record.thread().
parent aa3a6244
No related branches found
No related tags found
No related merge requests found
......@@ -190,7 +190,7 @@ public:
static void exit() __attribute__((__noreturn__));
static thread* current() __attribute((no_instrument_function));
stack_info get_stack_info();
cpu* tcpu() __attribute__((no_instrument_function));
cpu* tcpu() const __attribute__((no_instrument_function));
void join();
void set_cleanup(std::function<void ()> cleanup);
unsigned long id() __attribute__((no_instrument_function)); // guaranteed unique over system lifetime
......@@ -475,7 +475,7 @@ void thread::wake_with(Action action)
extern cpu __thread* current_cpu;
inline cpu* thread::tcpu()
inline cpu* thread::tcpu() const
{
return _cpu;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment