github.com/gotranspile/cxgo@v0.3.7/libs/sched.go (about)

     1  package libs
     2  
     3  const (
     4  	schedH = "sched.h"
     5  )
     6  
     7  func init() {
     8  	RegisterLibrary(schedH, func(c *Env) *Library {
     9  		return &Library{
    10  			// TODO
    11  			Header: `
    12  #include <` + BuiltinH + `>
    13  #include <` + sysTypesH + `>
    14  
    15  typedef struct sched_param {} sched_param;
    16  
    17  int    sched_get_priority_max(int);
    18  int    sched_get_priority_min(int);
    19  int    sched_getparam(pid_t, struct sched_param *);
    20  int    sched_getscheduler(pid_t);
    21  int    sched_rr_get_interval(pid_t, struct timespec *);
    22  int    sched_setparam(pid_t, const struct sched_param *);
    23  int    sched_setscheduler(pid_t, int, const struct sched_param *);
    24  int    sched_yield(void);
    25  `,
    26  		}
    27  	})
    28  }