Make all accesses to capabilites exclusive
commit9e875620ecd41735d8a5759a1e6986978cb55507
authorJakub Jermar <jakub@jermar.eu>
Mon, 18 Sep 2017 20:52:12 +0000 (18 22:52 +0200)
committerJakub Jermar <jakub@jermar.eu>
Mon, 18 Sep 2017 20:52:12 +0000 (18 22:52 +0200)
treefd32f87308ae166c47bff7318bd7f11914f55124
parente5f5ce03f9fc114c279f31bd164daf4e6dd8425e
Make all accesses to capabilites exclusive

This commit makes sure that all accesses to the capabilities array and other
metadata are protected by a mutex. This is necessary for future resizing of the
capabilities array.

Group task's capabilities by type so that it is possible to visit all
capabilities of the given type effectively.

Provide cap_publish() and cap_unpublish() to automate steps that make the
capability visible/invisible to userspace and insert/remove the capability from
the respective type list.
kernel/generic/include/cap/cap.h
kernel/generic/include/proc/task.h
kernel/generic/src/cap/cap.c
kernel/generic/src/ipc/ipc.c
kernel/generic/src/ipc/ipcrsc.c
kernel/generic/src/ipc/irq.c
kernel/generic/src/proc/task.c