Changeset 7171760 in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2011-08-18T12:05:00Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b33ec43
Parents:
866e627
Message:

Rework the way how open files are passed from parent task to child.

  • Instead of passing fdi_node_t's, pass handles directly using the IPC_M_STATE_CHANGE_AUTHORIZE mechanism.
  • Remove open_node(), fd_node(), fdi_node_t.
  • Replace fopen_node() with fopen_handle().
  • Replace fnode() with fhandle().
  • The child task does not synchronize with VFS yet.
Location:
uspace/lib/c/include
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/loader/loader.h

    r866e627 r7171760  
    3939#include <task.h>
    4040
    41 typedef struct fdi_node fdi_node_t;
    42 
    4341/** Forward declararion */
    4442struct loader;
     
    5149extern int loader_set_pathname(loader_t *, const char *);
    5250extern int loader_set_args(loader_t *, const char *const[]);
    53 extern int loader_set_files(loader_t *, fdi_node_t *const[]);
     51extern int loader_set_files(loader_t *, int *const[]);
    5452extern int loader_load_program(loader_t *);
    5553extern int loader_run(loader_t *);
  • uspace/lib/c/include/loader/pcb.h

    r866e627 r7171760  
    3838
    3939#include <sys/types.h>
    40 #include <vfs/vfs.h>
    4140
    4241typedef void (*entry_point_t)(void);
     
    6261       
    6362        /** Number of preset files. */
    64         int filc;
    65         /** Preset files. */
    66         fdi_node_t **filv;
     63        unsigned int filc;
    6764       
    6865        /*
  • uspace/lib/c/include/task.h

    r866e627 r7171760  
    3838#include <sys/types.h>
    3939
    40 typedef struct fdi_node fdi_node_t;
    41 
    4240typedef uint64_t task_id_t;
    4341
     
    5452extern int task_spawnv(task_id_t *, const char *path, const char *const []);
    5553extern int task_spawnvf(task_id_t *, const char *path, const char *const [],
    56     fdi_node_t *const []);
     54    int *const []);
    5755extern int task_spawnl(task_id_t *, const char *path, ...);
    5856
  • uspace/lib/c/include/vfs/vfs.h

    r866e627 r7171760  
    4646};
    4747
    48 /** Libc version of the VFS triplet.
    49  *
    50  * Unique identification of a file system node
    51  * within a file system instance.
    52  *
    53  */
    54 typedef struct fdi_node {
    55         fs_handle_t fs_handle;
    56         devmap_handle_t devmap_handle;
    57         fs_index_t index;
    58 } fdi_node_t;
    59 
    6048extern char *absolutize(const char *, size_t *);
    6149
     
    6452extern int unmount(const char *);
    6553
    66 extern int open_node(fdi_node_t *, int);
    67 extern int fd_node(int, fdi_node_t *);
    68 
    69 extern FILE *fopen_node(fdi_node_t *, const char *);
    70 extern int fnode(FILE *, fdi_node_t *);
     54extern FILE *fopen_handle(int);
     55extern int fhandle(FILE *, int *);
    7156
    7257extern async_exch_t *vfs_exchange_begin(void);
Note: See TracChangeset for help on using the changeset viewer.