Enable sending a notification when sending of an asynchronous message was
completed (successfully or not). AMF_NOTIFY_ERR can be used if the sender only wishes to be notified in case of an error (e.g., EDEADSRCDST). A new endpoint ASYNCM will be the sender of the notification.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
*/
|
||||
|
||||
/* Kernel tasks. These all run in the same address space. */
|
||||
#define ASYNCM ((endpoint_t) -5) /* notifies about finished async sends */
|
||||
#define IDLE ((endpoint_t) -4) /* runs when no one else can run */
|
||||
#define CLOCK ((endpoint_t) -3) /* alarms and other clock functions */
|
||||
#define SYSTEM ((endpoint_t) -2) /* request system functionality */
|
||||
@@ -62,7 +63,7 @@
|
||||
|
||||
/* Number of tasks. Note that NR_PROCS is defined in <minix/config.h>. */
|
||||
#define MAX_NR_TASKS 1023
|
||||
#define NR_TASKS 4
|
||||
#define NR_TASKS 5
|
||||
|
||||
/* User-space processes, that is, device drivers, servers, and INIT. */
|
||||
#define PM_PROC_NR ((endpoint_t) 0) /* process manager */
|
||||
|
||||
@@ -132,13 +132,15 @@ typedef struct asynmsg
|
||||
} asynmsg_t;
|
||||
|
||||
/* Defines for flags field */
|
||||
#define AMF_EMPTY 0 /* slot is not inuse */
|
||||
#define AMF_VALID 1 /* slot contains message */
|
||||
#define AMF_DONE 2 /* Kernel has processed the message. The
|
||||
#define AMF_EMPTY 000 /* slot is not inuse */
|
||||
#define AMF_VALID 001 /* slot contains message */
|
||||
#define AMF_DONE 002 /* Kernel has processed the message. The
|
||||
* result is stored in 'result'
|
||||
*/
|
||||
#define AMF_NOTIFY 4 /* Send a notification when AMF_DONE is set */
|
||||
#define AMF_NOREPLY 8 /* Not a reply message for a SENDREC */
|
||||
#define AMF_NOTIFY 004 /* Send a notification when AMF_DONE is set */
|
||||
#define AMF_NOREPLY 010 /* Not a reply message for a SENDREC */
|
||||
#define AMF_NOTIFY_ERR 020 /* Send a notification when AMF_DONE is set and
|
||||
* delivery of the message failed */
|
||||
|
||||
/* Hide names to avoid name space pollution. */
|
||||
#define echo _echo
|
||||
|
||||
Reference in New Issue
Block a user