linuxsched

package module
v0.0.0-...-baa9343 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2016 License: Apache-2.0 Imports: 2 Imported by: 12

README

go-linuxsched

Build Status GoDoc

Go binding for sched_setattr(2) and sched_getattr(2).

type SchedAttr struct {
	Policy   SchedPolicy
	Flags    SchedFlag
	Nice     int32
	Priority uint32
	Runtime  time.Duration
	Deadline time.Duration
	Period   time.Duration
}

func SetAttr(pid int, attr SchedAttr) error {..}

func GetAttr(pid int) (SchedAttr, error) {..}

Projects using go-linuxsched

Documentation

Index

Constants

View Source
const (
	Normal   SchedPolicy = 0
	FIFO     SchedPolicy = 1
	RR       SchedPolicy = 2
	Batch    SchedPolicy = 3
	Idle     SchedPolicy = 5
	Deadline SchedPolicy = 6

	ResetOnFork SchedFlag = 0x01
)

Variables

This section is empty.

Functions

func SetAttr

func SetAttr(pid int, attr SchedAttr) error

sched_setattr(2)

Types

type SchedAttr

type SchedAttr struct {
	Policy   SchedPolicy
	Flags    SchedFlag
	Nice     int32
	Priority uint32
	Runtime  time.Duration
	Deadline time.Duration
	Period   time.Duration
}

func GetAttr

func GetAttr(pid int) (SchedAttr, error)

sched_getattr(2)

type SchedFlag

type SchedFlag uint64

type SchedPolicy

type SchedPolicy uint32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL