git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: make pci device driver loading passive, pci bus scanner will not load them...
[lunaix-os.git]
/
lunaix-os
/
kernel
/
process
/
task_attr.c
diff --git
a/lunaix-os/kernel/process/task_attr.c
b/lunaix-os/kernel/process/task_attr.c
index f90ed35941fdb6878f3ab353c017d652c8cb7dd5..1cca227937fdbc980ae9e9703118ee3f80e11cd5 100644
(file)
--- a/
lunaix-os/kernel/process/task_attr.c
+++ b/
lunaix-os/kernel/process/task_attr.c
@@
-1,17
+1,18
@@
#include <lunaix/fs/taskfs.h>
#include <lunaix/fs/taskfs.h>
+#include <lunaix/process.h>
void
__read_pending_sig(struct twimap* map)
{
struct proc_info* proc = twimap_data(map, struct proc_info*);
void
__read_pending_sig(struct twimap* map)
{
struct proc_info* proc = twimap_data(map, struct proc_info*);
- twimap_printf(map, "%bb", proc->sig_pending);
+ twimap_printf(map, "%bb", proc->sig
ctx.sig
_pending);
}
void
__read_masked_sig(struct twimap* map)
{
struct proc_info* proc = twimap_data(map, struct proc_info*);
}
void
__read_masked_sig(struct twimap* map)
{
struct proc_info* proc = twimap_data(map, struct proc_info*);
- twimap_printf(map, "%bb", proc->sig_mask);
+ twimap_printf(map, "%bb", proc->sig
ctx.sig
_mask);
}
void
}
void
@@
-38,7
+39,9
@@
__read_pgid(struct twimap* map)
void
__read_children(struct twimap* map)
{
void
__read_children(struct twimap* map)
{
- struct proc_info* proc = twimap_index(map, struct proc_info*);
+ struct llist_header* proc_list = twimap_index(map, struct llist_header*);
+ struct proc_info* proc =
+ container_of(proc_list, struct proc_info, siblings);
if (!proc)
return;
twimap_printf(map, "%d ", proc->pid);
if (!proc)
return;
twimap_printf(map, "%d ", proc->pid);
@@
-47,11
+50,12
@@
__read_children(struct twimap* map)
int
__next_children(struct twimap* map)
{
int
__next_children(struct twimap* map)
{
- struct proc_info* proc = twimap_index(map, struct proc_info*);
+ struct llist_header* proc = twimap_index(map, struct llist_header*);
+ struct proc_info* current = twimap_data(map, struct proc_info*);
if (!proc)
return 0;
if (!proc)
return 0;
- map->index =
container_of(proc->siblings.next, struct proc_info, siblings)
;
- if (map->index ==
proc
) {
+ map->index =
proc->next
;
+ if (map->index ==
¤t->children
) {
return 0;
}
return 1;
return 0;
}
return 1;
@@
-65,7
+69,7
@@
__reset_children(struct twimap* map)
map->index = 0;
return;
}
map->index = 0;
return;
}
- map->index =
container_of(proc->children.next, struct proc_info, siblings)
;
+ map->index =
proc->children.next
;
}
void
}
void