1.1 --- a/libsystypes/include/systypes/base.h Thu Feb 16 23:36:52 2023 +0100
1.2 +++ b/libsystypes/include/systypes/base.h Fri Feb 17 18:39:43 2023 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * Base types used by various other types.
1.6 *
1.7 - * Copyright (C) 2019, 2021, 2022 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2019, 2021, 2022, 2023 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -49,12 +49,28 @@
1.13
1.14 enum notify_flags
1.15 {
1.16 - NOTIFY_CONTENT_AVAILABLE = 1, /* reading files and pipes */
1.17 - NOTIFY_SPACE_AVAILABLE = 2, /* writing pipes */
1.18 - NOTIFY_PEER_CLOSED = 4, /* closing files and pipes */
1.19 - NOTIFY_FILE_OPENED = 8, /* opening files in directories */
1.20 + NOTIFY_CONTENT_AVAILABLE = 0x001, /* reading files and pipes */
1.21 + NOTIFY_SPACE_AVAILABLE = 0x002, /* writing pipes */
1.22 + NOTIFY_PEER_CLOSED = 0x004, /* closing files and pipes */
1.23 + NOTIFY_FILE_OPENED = 0x008, /* opening files in directories */
1.24 + NOTIFY_TASK_SIGNAL = 0x100, /* signal from task */
1.25 };
1.26
1.27 +/* Notifiable object types. */
1.28 +
1.29 +typedef struct
1.30 +{
1.31 + l4_cap_idx_t ref;
1.32 +
1.33 +} notifiable_base_t;
1.34 +
1.35 +typedef struct
1.36 +{
1.37 + notifiable_base_t *base; /* access to the specific object */
1.38 + notify_flags_t notifications;
1.39 +
1.40 +} notifiable_t;
1.41 +
1.42 /* Filesystem object properties. */
1.43
1.44 typedef unsigned long object_flags_t;