Age | Commit message (Collapse) | Author |
|
Instead of combining assertions and checking into single functions,
rework those into pure checking functions usable with assert().
Those functions were introduced because of warnings about unused
functions/variables caused by an earlier implementation of assert().
|
|
Commit d2a89f7f6e976d022527c2a5a1c75268aab8cd49 changed sleep queues to
allow semaphores to be signalled from interrupt handlers, but this
implied disabling interrupts for all synchronization objects, and most
of them do not require interrupts to be disabled.
The sleep queue interface is augmented with interrupt-related versions.
|
|
The broadcast implementation is based on an invalid assumption, namely
that the first mutex_unlock call following condition_wait would be invoked
on the same mutex. Fixing this while guarding against the thundering herd
effect requires augmenting mutexes with a pointer to the condition
variable they may be associated with. Since the size of mutexes is
currently more important than broadcast scalability, the implementation
is simplified into one which suffers from the thundering herd effect.
|
|
This reverts commit d18d0e85596f90e0bd597b33d58209d0b3973c95.
|
|
This makes sure symbols referenced by assert uses may not be generated
if unused. The recently introduced __unused macro is used to suppress
compiler warnings resulting from this change.
|
|
|
|
This turns assert.h into a standard header.
|
|
|
|
|
|
|
|
Instead of mixing standard headers and internal redefinitions of standard
types, completely rely on the compiler for what is guaranteed for a free
standing environment. This results in the removal of kern/stddef.h and
kern/stdint.h. The kern/types.h header is reintroduced for the different
(and saner) purpose of defining types not specified in standard C,
namely ssize_t for now.
|
|
Using a single header for all types causing inclusion circular
dependencies isn't very elegant and doesn't scale.
|
|
This change was done using astyle, with a few manual editing here and
there.
|
|
This change affects more files than it apparently would at first glance.
This is because circular dependencies can easily be created between the
thread, mutex, condition and spinlock modules. As a result, some of the
types of these modules are now defined in kern/types.h.
|
|
Make spin locks and mutexes encode their state on an int rather than
a long.
|
|
|
|
The condition module intrusively uses mutexes. Augment the interface of
the mutex module so that mutexes and conditions share common code. As a
side effect, the implementation should have gained in clarity.
|
|
|