Typedef some common structs
This commit is contained in:
parent
52f88785c4
commit
eec052bafa
2 changed files with 17 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#include <proc.h>
|
||||
|
||||
struct Cpu cpus[NCPU];
|
||||
Cpu cpus[NCPU];
|
||||
|
||||
/**
|
||||
* Must be called with interrupts disabled, to prevent race with process being
|
||||
|
|
@ -14,8 +14,8 @@ int cpuid() {
|
|||
/**
|
||||
* Return this CPU's cpu struct. Interrupts must be disabled.
|
||||
*/
|
||||
struct Cpu *mycpu(void) {
|
||||
int id = cpuid();
|
||||
struct Cpu *c = &cpus[id];
|
||||
Cpu *mycpu(void) {
|
||||
int id = cpuid();
|
||||
Cpu *c = &cpus[id];
|
||||
return c;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue