#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*);
- twimap_printf(map, "%bb", proc->sig_pending);
+ twimap_printf(map, "%bb", proc->sigctx.sig_pending);
}
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->sigctx.sig_mask);
}
void
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);
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;
- 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;
map->index = 0;
return;
}
- map->index = container_of(proc->children.next, struct proc_info, siblings);
+ map->index = proc->children.next;
}
void