+static inline int
+__report_task_entries(struct v_file* file, struct dir_context* dctx)
+{
+ unsigned int counter = 0;
+ char name[VFS_NAME_MAXLEN];
+ struct proc_info *pos, *n;
+
+ llist_for_each(pos, n, sched_ctx.proc_list, tasks)
+ {
+ if (!fsapi_readdir_pos_entries_at(file, counter)) {
+ counter++;
+ continue;
+ }
+
+ ksnprintf(name, VFS_NAME_MAXLEN, "%d", pos->pid);
+ dctx->read_complete_callback(dctx, name, VFS_NAME_MAXLEN, DT_DIR);
+ return 1;
+ }
+
+ return 0;
+}
+
+static inline int
+__report_task_attributes(struct v_file* file, struct dir_context* dctx)
+{
+ unsigned int counter = 0;
+ struct task_attribute *pos, *n;
+
+ list_for_each(pos, n, attributes.first, siblings)
+ {
+ if (fsapi_readdir_pos_entries_at(file, counter)) {
+ dctx->read_complete_callback(
+ dctx, HSTR_VAL(pos->key), VFS_NAME_MAXLEN, DT_FILE);
+ return 1;
+ }
+ counter++;
+ }
+
+ return 0;
+}
+