#include <far_pointers.h>
#include <linux/sched.h>
#include <ssdef.h>
#include <cpbdef.h>
#include <ipldef.h>
#include <statedef.h>
#include <internals.h>
#include <smp_routines.h>
#include <asm/hw_irq.h>
#include <prvdef.h>
#include <exe_routines.h>
#include <starlet.h>
#include <capdef.h>
Go to the source code of this file.
Functions | |
int | sch_calculate_affinity (int mask) |
int | sch_clear_affinity (unsigned int cpu_mask, struct _pcb *pcb, unsigned int flags, UINT64_PQ prev_mask_p) |
int | sch_add_cpu_cap (unsigned int cpu_id, unsigned int mask, UINT64_PQ prev_mask_p) |
add cpu capabilities - see 7.0 2.5 | |
int | sch_clear_capability (struct _pcb *pcb, unsigned int mask, unsigned int cpu_id, unsigned int flags, UINT64_PQ prev_mask_p) |
set process capability - see 7.0 2.5 | |
int | sch_set_affinity (unsigned int cpu_mask, struct _pcb *pcb, unsigned int flags, UINT64_PQ prev_mask_p) |
set affinity - see 7.0 2.5.2 | |
sch_remove_cpu_cap (unsigned int cpu_id, unsigned int mask, UINT64_PQ prev_mask_p) | |
remove cpu capabilities - see 5.2 12.5.4 or 7.0 2.5 | |
int | sch_set_capability (struct _pcb *pcb, unsigned int mask, unsigned int cpu_id, unsigned int flags, UINT64_PQ prev_mask_p) |
set process capability - see 7.0 2.5 | |
int | sch_acquire_affinity (struct _pcb *pcb, int obsolete, int cpu_id) |
acquire affinity - see 5.2 12.5.4 or 7.0 2.5.4 | |
int | sch_release_affinity (struct _pcb *pcb) |
release (acquire in reverse) affinity - see 7.0 2.5.4 | |
int | scs_std_change_affinity (struct _ucb *ucb_p) |
int | sch_release_capability (struct _pcb *pcb, unsigned int mask, unsigned int cpu_id, unsigned int flags, UINT64_PQ prev_mask_p) |
int | sch_require_capability (struct _pcb *pcb, unsigned int mask, unsigned int cpu_id, unsigned int flags, UINT64_PQ prev_mask_p) |
remove cpu capabilities - see 5.2 12.5.4 | |
asmlinkage int | exe_cpu_capabilities (int cpu_id, struct _generic_64 *select_mask, struct _generic_64 *modify_mask, struct _generic_64 *prev_mask, struct _generic_64 *flags) |
modify cpu capabilities - see 7.0 2.5 | |
asmlinkage int | exe_process_capabilities (unsigned int *pidadr, void *prcnam, struct _generic_64 *select_mask, struct _generic_64 *modify_mask, struct _generic_64 *prev_mask, struct _generic_64 *flags) |
modify process user capabilities - see 7.0 2.5 | |
asmlinkage int | exe_process_capabilities_wrap (struct struct_args *s) |
Definition in file capability.c.
asmlinkage int exe_cpu_capabilities | ( | int | cpu_id, | |
struct _generic_64 * | select_mask, | |||
struct _generic_64 * | modify_mask, | |||
struct _generic_64 * | prev_mask, | |||
struct _generic_64 * | flags | |||
) |
modify cpu capabilities - see 7.0 2.5
Definition at line 227 of file capability.c.
References CAP_M_FLAG_DEFAULT_ONLY, ctl_gl_pcb, IPL__ASTDEL, PRV_M_ALTPRI, PRV_M_WORLD, sch_add_cpu_cap(), sch_gl_default_cpu_cap, sch_remove_cpu_cap(), smp_gl_cpu_data, SPIN_SCHED, SS__NOPRIV, and SS__NORMAL.
asmlinkage int exe_process_capabilities | ( | unsigned int * | pidadr, | |
void * | prcnam, | |||
struct _generic_64 * | select_mask, | |||
struct _generic_64 * | modify_mask, | |||
struct _generic_64 * | prev_mask, | |||
struct _generic_64 * | flags | |||
) |
modify process user capabilities - see 7.0 2.5
call clear capability
call set capability? TODO check and fix typo
Definition at line 267 of file capability.c.
References _pcb, CAP_M_FLAG_DEFAULT_ONLY, ctl_gl_pcb, exe_nampid(), IPL__ASTDEL, sch_clear_capability(), sch_gl_default_process_cap, sch_release_capability(), sch_require_capability(), SPIN_SCHED, SS__NOPRIV, and SS__NORMAL.
Referenced by exe_process_capabilities_wrap().
asmlinkage int exe_process_capabilities_wrap | ( | struct struct_args * | s | ) |
Definition at line 322 of file capability.c.
References exe_process_capabilities(), struct_args::s1, struct_args::s2, struct_args::s3, struct_args::s4, struct_args::s5, and struct_args::s6.
int sch_acquire_affinity | ( | struct _pcb * | pcb, | |
int | obsolete, | |||
int | cpu_id | |||
) |
acquire affinity - see 5.2 12.5.4 or 7.0 2.5.4
use affinity_skip from global (non-7.0 member) TODO check if used
note that pcb capability is not 7.0
set implicit affinity flag
store cpu_id in ktb bias_cell, probably pcb affinity, TODO both?
if current pcb
do resched interrupt or send one to other cpu
Definition at line 133 of file capability.c.
References CPU_M_RESCHED, ctl_gl_pcb, smp_send_work(), and SS__NORMAL.
Referenced by exe_set_implicit_affinity().
int sch_add_cpu_cap | ( | unsigned int | cpu_id, | |
unsigned int | mask, | |||
UINT64_PQ | prev_mask_p | |||
) |
add cpu capabilities - see 7.0 2.5
increase capability sequence
Definition at line 51 of file capability.c.
References sch_al_cpu_cap, sch_gl_capability_sequence, smp_gl_cpu_data, and SS__NORMAL.
Referenced by exe_cpu_capabilities(), and vms_init().
int sch_calculate_affinity | ( | int | mask | ) |
int sch_clear_affinity | ( | unsigned int | cpu_mask, | |
struct _pcb * | pcb, | |||
unsigned int | flags, | |||
UINT64_PQ | prev_mask_p | |||
) |
Definition at line 35 of file capability.c.
References CPB_M_FLAG_PERMANENT, and SS__NORMAL.
Referenced by exe_process_affinity().
int sch_clear_capability | ( | struct _pcb * | pcb, | |
unsigned int | mask, | |||
unsigned int | cpu_id, | |||
unsigned int | flags, | |||
UINT64_PQ | prev_mask_p | |||
) |
set process capability - see 7.0 2.5
Definition at line 65 of file capability.c.
References SS__NORMAL.
Referenced by exe_process_capabilities().
int sch_release_affinity | ( | struct _pcb * | pcb | ) |
release (acquire in reverse) affinity - see 7.0 2.5.4
note that pcb capability is not 7.0
clear implicit affinity flag
Definition at line 158 of file capability.c.
References SS__NORMAL.
Referenced by exe_set_implicit_affinity().
int sch_release_capability | ( | struct _pcb * | pcb, | |
unsigned int | mask, | |||
unsigned int | cpu_id, | |||
unsigned int | flags, | |||
UINT64_PQ | prev_mask_p | |||
) |
Definition at line 167 of file capability.c.
References SS__NORMAL.
Referenced by exe_process_capabilities().
sch_remove_cpu_cap | ( | unsigned int | cpu_id, | |
unsigned int | mask, | |||
UINT64_PQ | prev_mask_p | |||
) |
remove cpu capabilities - see 5.2 12.5.4 or 7.0 2.5
as add, but in reverse maybe it has need for rescheduling too
clear cpu-data cpu capability bit
and clear the corresponding bit in cpu_cap table
increment capability sequence to indicate a change
get current pcb and compare its mask
do resched interrupt or send one to other cpu
Definition at line 96 of file capability.c.
References _pcb, CPU_M_RESCHED, ctl_gl_pcb, sch_al_cpu_cap, sch_gl_capability_sequence, smp_gl_cpu_data, smp_send_work(), and SS__NORMAL.
Referenced by exe_cpu_capabilities().
int sch_require_capability | ( | struct _pcb * | pcb, | |
unsigned int | mask, | |||
unsigned int | cpu_id, | |||
unsigned int | flags, | |||
UINT64_PQ | prev_mask_p | |||
) |
remove cpu capabilities - see 5.2 12.5.4
acquire spinlock sched
save prev mask
sets the new or-ed capability
if wanted, set pcb_l_permanant_capability
calculate affinity
if running pcb
if current affinity is not the cpu_id
do resched interrupt or send one to other cpu
release spinlock sched
Definition at line 177 of file capability.c.
References CPB_M_FLAG_PERMANENT, CPU_M_RESCHED, ctl_gl_pcb, IPL__SCHED, smp_gl_cpu_data, smp_send_work(), SPIN_SCHED, and SS__NORMAL.
Referenced by exe_process_capabilities().
int sch_set_affinity | ( | unsigned int | cpu_mask, | |
struct _pcb * | pcb, | |||
unsigned int | flags, | |||
UINT64_PQ | prev_mask_p | |||
) |
set affinity - see 7.0 2.5.2
store a new value if pcb affinity (7.0 ktb affinity)
Definition at line 77 of file capability.c.
References CPB_M_FLAG_PERMANENT, and SS__NORMAL.
Referenced by exe_process_affinity().
int sch_set_capability | ( | struct _pcb * | pcb, | |
unsigned int | mask, | |||
unsigned int | cpu_id, | |||
unsigned int | flags, | |||
UINT64_PQ | prev_mask_p | |||
) |
set process capability - see 7.0 2.5
Definition at line 121 of file capability.c.
References SS__NORMAL.
int scs_std_change_affinity | ( | struct _ucb * | ucb_p | ) |