akaros/kern/include/ros/bits/event.h
<<
>>
Prefs
   1/* Copyright (c) 2010-2011 The Regents of the University of California
   2 * Barret Rhoden <brho@cs.berkeley.edu>
   3 * See LICENSE for details.
   4 *
   5 * Bits for the kernel interface for event. */
   6
   7#pragma once
   8
   9#include <ros/common.h>
  10
  11/* Event Delivery Flags from the process to the kernel */
  12#define EVENT_IPI               0x00001 /* IPI the vcore (usually with INDIR) */
  13#define EVENT_SPAM_PUBLIC       0x00002 /* spam the msg to public vcpd mboxes */
  14#define EVENT_INDIR             0x00004 /* send an indirection event to vcore */
  15#define EVENT_VCORE_PRIVATE     0x00008 /* Will go to the private VCPD mbox */
  16#define EVENT_SPAM_INDIR        0x00010 /* spam INDIRs if the vcore's offline */
  17#define EVENT_VCORE_MUST_RUN    0x00020 /* spams go to a vcore that will run */
  18#define EVENT_NOTHROTTLE        0x00040 /* send all INDIRs (no throttling) */
  19#define EVENT_ROUNDROBIN        0x00080 /* pick a vcore, RR style */
  20#define EVENT_VCORE_APPRO       0x00100 /* send to where the kernel wants */
  21#define EVENT_WAKEUP            0x00200 /* wake up the process after sending */
  22
  23/* Event Message Types */
  24#define EV_NONE                  0
  25#define EV_PREEMPT_PENDING       1
  26#define EV_GANG_PREMPT_PENDING   2
  27#define EV_VCORE_PREEMPT         3
  28#define EV_GANG_RETURN           4
  29#define EV_USER_IPI              5
  30#define EV_PAGE_FAULT            6
  31#define EV_ALARM                 7
  32#define EV_EVENT                 8
  33#define EV_FREE_APPLE_PIE        9
  34#define EV_SYSCALL              10
  35#define EV_CHECK_MSGS           11
  36#define EV_POSIX_SIGNAL         12
  37#define NR_EVENT_TYPES          25 /* keep me last (and 1 > the last one) */
  38
  39/* Will probably have dynamic notifications later */
  40#define MAX_NR_DYN_EVENT        25
  41#define MAX_NR_EVENT            (NR_EVENT_TYPES + MAX_NR_DYN_EVENT)
  42
  43/* Want to keep this small and generic, but add items as you need them.  One
  44 * item some will need is an expiration time, which ought to be put in the 64
  45 * bit arg.  Will need tweaking / thought as we come up with events.  These are
  46 * what get put on the per-core queue in procdata. */
  47struct event_msg {
  48        uint16_t                        ev_type;
  49        uint16_t                        ev_arg1;
  50        uint32_t                        ev_arg2;
  51        void                            *ev_arg3;
  52        uint64_t                        ev_arg4;
  53};
  54