History log of /seL4-camkes-master/tools/rumprun/include/bmk-core/sched.h
Revision Date Author Comments
# f4e70452 25-Mar-2019 Curtis Millar <curtis.millar@data61.csiro.au>

Use sel4runtime for TLS management.

sel4runtime will initilise the TLS for the first thread in the process
(this should not be overridden as it was in entry.c).

Instead of using the nasty trick of de-initialising the TLS with a null
pointer to set variables in remote TLS, we use the tools from
sel4runtime that aren't so destructive to configure the state for libbmk
and to also ensure that the IPC buffer pointer is set on each thread.

The existing tooling for creating and allocating TLS can still be used
as sel4runtime makes no assumptions or changes to the size or layout of
TLS.

THe platform-independant interface for configuring the TLS from
sel4runtime is also used rather than specific implementations for
different architectures.


# 829e76fa 07-Aug-2015 Antti Kantee <pooka@iki.fi>

clock routines don't belong in sched.h, move to platform.h


# e8a5b303 26-May-2015 Antti Kantee <pooka@iki.fi>

Retire sched_nanosleep(), blockprepare_timeout() is sufficient


# a95a32a2 26-May-2015 Antti Kantee <pooka@iki.fi>

Hide raw bmk_sched() from public and provide bmk_sched_block()

In addition to being a responsible abstraction, fixes
scheduler assert meltdown reported as part of issue #20


# f17b1588 13-May-2015 Antti Kantee <pooka@iki.fi>

Remove the "thread" argument from sched_block()

Also rename sched_block() to sched_blockprepare(). The only perverted
routines that need to pass the thread argument to cancel threads
from being able to be scheduled derives from libpthread, and that
has completely different semantics from block, so give it its own
suspend()/unsuspend() interfaces (currently unimplemented).


# 6e3d646e 13-May-2015 Antti Kantee <pooka@iki.fi>

bmk_sched_current() -> bmk_current


# 17d854f5 13-May-2015 Antti Kantee <pooka@iki.fi>

Use TLS for "current" instead of stack-based retrieval.


# 31d7f25d 12-May-2015 Antti Kantee <pooka@iki.fi>

separate tls switch from context switch


# e7e2256d 12-May-2015 Antti Kantee <pooka@iki.fi>

Use TLS for the _lwp implementation.


# a3254d5b 05-May-2015 Antti Kantee <pooka@iki.fi>

Allocate extra space in TLS for the stack protector canary.

It's difficult to catch all the places where -fno-stack-protector
is required, so at least ensure that the stack protector doesn't
dereference random garbage.


# ac6f4c98 21-Apr-2015 Antti Kantee <pooka@iki.fi>

Give "sleep indefinitely" a name: BMK_SCHED_BLOCK_INFTIME.


# 6b11ec6e 21-Apr-2015 Antti Kantee <pooka@iki.fi>

Rename bmk_clock_*() to bmk_platform_clock_*()

They are expected to be implemented by the underlying platform.


# ba97d55d 21-Apr-2015 Antti Kantee <pooka@iki.fi>

Common name for thread switch routine: bmk_platform_cpu_sched_switch().

Not sure if it can be unified, since it needs to handle the TLS context
switch, which is apparently slightly different in a virtualized env and
on bare metal, so keep the implementations separate for now.


# 14eaa5c0 21-Apr-2015 Antti Kantee <pooka@iki.fi>

allow bmk_sched_init() to pass an arg to the main function


# 516a6463 20-Apr-2015 Antti Kantee <pooka@iki.fi>

Match baremetal "curlwp" with xen

i.e. store thread pointer at the end of the stack. This is done
merely to minimize diffs for now, and will be fixed with tls.


# 4c102e85 20-Apr-2015 Antti Kantee <pooka@iki.fi>

Make bmk_sched_init() jump from bootstrap thread to main thread.

Convert baremetal.


# 5f2f2495 20-Apr-2015 Antti Kantee <pooka@iki.fi>

Provide bmk_sched_threadname() in both schedulers


# d2394630 20-Apr-2015 Antti Kantee <pooka@iki.fi>

unify timed sleeps in the scheduler


# 0863c9ac 20-Apr-2015 Antti Kantee <pooka@iki.fi>

Add a scheduler debug routine for dumping the thread queue.


# 314d4bab 20-Apr-2015 Antti Kantee <pooka@iki.fi>

Fix sched_yield() to actually yield.


# 0841dd9f 07-Apr-2015 Antti Kantee <pooka@iki.fi>

add bmk_clock_epochoffset()

Returns bmk_time_t diff between monotonic clock and wall clock
at the time of the call.


# f61d9e14 07-Apr-2015 Antti Kantee <pooka@iki.fi>

use common thread-switching assembly between platforms


# 99bddf53 05-Apr-2015 Antti Kantee <pooka@iki.fi>

declare bmk_clock_monotonic()

returns monotonically increasing nanoseconds


# 70337725 05-Apr-2015 Antti Kantee <pooka@iki.fi>

Add copyright/license.

Better late than never ...


# afffcc9d 05-Apr-2015 Antti Kantee <pooka@iki.fi>

Make bmk_time_t a bmk-core type

It's still unsure how many types we should provide in bmk-core, but
this one is useful since it avoids having to keep typing "long long"
all over the place.


# 908eaed9 04-Apr-2015 Antti Kantee <pooka@iki.fi>

Move the baremetal scheduler interface definition to bmk-core.

The implementations for baremetal and mini-os still remain private
(for now).


# bb5731d6 01-Apr-2015 Antti Kantee <pooka@iki.fi>

Add a platform-independent tcb definition to bmk-core

It's MI for now. Even if we have to go MD at some point, this
initial MI approach avoids having identical copies.