"Fossies" - the Fresh Open Source Software Archive

Member "dmd2/src/druntime/import/core/sys/solaris/sys/procset.d" (20 Nov 2020, 1033 Bytes) of package /linux/misc/dmd.2.094.2.linux.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /**
    2  * D header file defining a process set.
    3  *
    4  * Copyright:   Copyright 2014 Jason King.
    5  * License:     $(HTTP www.boost.org/LICENSE_1.0.txt, Boost License 1.0).
    6  * Authors:     Jason King
    7  */
    8 
    9 /*
   10  * Copyright 2014 Jason King.
   11  * Distributed under the Boost Software License, Version 1.0.
   12  * See accompanying file LICENSE or copy at
   13  *  http://www.boost.org/LICENSE_1_0.txt
   14  */
   15 module core.sys.solaris.sys.procset;
   16 
   17 version (Solaris):
   18 nothrow:
   19 @nogc:
   20 
   21 import core.sys.posix.sys.types : id_t;
   22 import core.sys.posix.sys.wait : idtype_t;
   23 
   24 enum P_INITPID  = 1;
   25 enum P_INITUID  = 0;
   26 enum P_INITPGID = 0;
   27 
   28 enum idop_t
   29 {
   30     POP_DIFF,
   31     POP_AND,
   32     POP_OR,
   33     POP_XOR
   34 }
   35 
   36 struct procset_t
   37 {
   38     idop_t      p_op;
   39     idtype_t    p_lidtype;
   40     id_t        p_lid;
   41     idtype_t    p_ridtype;
   42     id_t        p_rid;
   43 }
   44 
   45 void setprocset(ref procset_t psp, idop_t op, idtype_t ltype, id_t lid, idtype_t rtype, id_t rid)
   46 {
   47     psp.p_op = op;
   48     psp.p_lidtype = ltype;
   49     psp.p_lid = lid;
   50     psp.p_ridtype = rtype;
   51     psp.p_rid = rid;
   52 }
   53