Ignore:
Timestamp:
Mar 18, 2020, 11:16:59 PM (4 years ago)
Author:
alain
Message:

Introduce remote_buf.c/.h & socket.c/.h files.
Update dev_nic.c/.h files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/process.h

    r651 r657  
    44 * Authors  Ghassan Almaless (2008,2009,2010,2011,2012)
    55 *          Mohamed Lamine Karaoui (2015)
    6  *          Alain Greiner (2016,2017,2018,2019)
     6 *          Alain Greiner (2016,2017,2018,2019,2020)
    77 *
    88 * Copyright (c) UPMC Sorbonne Universites
     
    7070/*********************************************************************************************
    7171 * This structure defines an array of extended pointers on the open file descriptors
    72  * for a given process. We use an extended pointer because the open file descriptor
    73  * is always stored in the same cluster as the inode associated to the file.
     72 * for a given process. We use an extended pointer because the open file descriptors
     73 * are always stored in the same cluster as the inode associated to the file.
    7474 * A free entry in this array contains the XPTR_NULL value.
    7575 * The array size is defined by the CONFIG_PROCESS_FILE_MAX_NR parameter.
     
    7979 *       - the fd_array[] in a process copy is simply a cache containing a subset of the
    8080 *         open files to speed the fdid to xptr translation, but the "lock" and "current
    81  *         fields are not used.
    82  *       - all modifications made by the process_fd_remove() are done in reference cluster
    83  *         and reported in all process_copies.
     81 *         fields are not significant for these copies.
     82 *       - the modifications made by the process_fd_remove() function are done in the
     83 *         reference cluster in all process_copies.
     84 *       - The modifications made by the process_fd_register() function are done in the
     85 *         reference cluster, and in the cluster containing the calling thread.
    8486 ********************************************************************************************/
    8587
     
    436438
    437439/*********************************************************************************************
    438  * This function allocates a free slot in the fd_array of the reference process
     440 * This function allocates a free slot in the fd_array of the reference process descriptor
    439441 * identified by the <process_xp> argument, register the <file_xp> argument in the
    440442 * allocated slot, and return the slot index in the <fdid> buffer.
    441  * It can be called by any thread in any cluster, because it uses remote access
    442  * primitives to access the reference process descriptor.
     443 * Note: we must use the reference process descriptor, because the reference fd_array is
     444 * contained in the reference cluster.  It can be called by any thread in any cluster.
    443445 * It takes the lock protecting the reference fd_array against concurrent accesses.
    444446 *********************************************************************************************
     
    454456/*********************************************************************************************
    455457 * This function uses as many remote accesses as required, to reset an entry in fd_array[],
    456  * in all clusters containing a copy. The entry is identified by the <fdid> argument.
    457  * This function must be executed by a thread running in reference cluster, that contains
    458  * the complete list of process descriptors copies.
     458 * identified by the <fdid> argument, in all clusters containing a copy of the
     459 * process descriptor, identified by the <process_xp> argument.
     460 * Note: we must use the owner process descriptor, because only this owner cluster contains
     461 * the list of process copies. It can be called by any thread in any cluster.
    459462 * It takes the lock protecting the reference fd_array against concurrent accesses.
    460  * TODO this function is not implemented yet.
    461463 *********************************************************************************************
    462464 * @ process  : [in] pointer on the local process descriptor.
    463465 * @ fdid     : [in] file descriptor index in the fd_array.
    464466 ********************************************************************************************/
    465 void process_fd_remove( process_t * process,
    466                         uint32_t    fdid );
     467void process_fd_remove( xptr_t     process_xp,
     468                        uint32_t   fdid );
    467469
    468470/*********************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.