mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 02:40:08 +00:00
CPU affinity configuration fixes
- if no affinity was set for a new thread before calling Cpu_session::start(), the CPU session's affinity gets set for this thread - documentation fix: <affinity_space> -> <affinity-space> Fixes #873.
This commit is contained in:
parent
2501cb189e
commit
3e8e55ec16
@ -114,7 +114,19 @@ namespace Genode {
|
||||
}
|
||||
|
||||
const char *name() { return _name; }
|
||||
void affinity(Affinity::Location) { }
|
||||
|
||||
/**
|
||||
* Set the executing CPU for this thread
|
||||
*
|
||||
* SMP is currently not directly supported on Genode/Linux
|
||||
* (but indirectly by the Linux kernel).
|
||||
*/
|
||||
void affinity(Affinity::Location) { }
|
||||
|
||||
/**
|
||||
* Request the affinity of this thread
|
||||
*/
|
||||
Affinity::Location affinity() { return Affinity::Location(); }
|
||||
|
||||
/**
|
||||
* Register process ID and thread ID of thread
|
||||
|
@ -122,6 +122,13 @@ int Cpu_session_component::start(Thread_capability thread_cap,
|
||||
*/
|
||||
thread->update_exception_sigh();
|
||||
|
||||
/*
|
||||
* If no affinity location was set for this specific thread before,
|
||||
* we set the one which was defined for the whole CPU session.
|
||||
*/
|
||||
if (!thread->platform_thread()->affinity().valid())
|
||||
thread->platform_thread()->affinity(_location);
|
||||
|
||||
return thread->platform_thread()->start((void *)ip, (void *)sp);
|
||||
}
|
||||
|
||||
|
@ -564,7 +564,7 @@ declaration describes an affinity space of 4x2:
|
||||
|
||||
! <config>
|
||||
! ...
|
||||
! <affinity_space width="4" height="2" />
|
||||
! <affinity-space width="4" height="2" />
|
||||
! ...
|
||||
! </config>
|
||||
|
||||
|
@ -263,7 +263,7 @@ example, the following declaration describes an affinity space of 4x2:
|
||||
|
||||
! <config>
|
||||
! ...
|
||||
! <affinity_space width="4" height="2" />
|
||||
! <affinity-space width="4" height="2" />
|
||||
! ...
|
||||
! </config>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user