Ignore:
Timestamp:
Aug 2, 2018, 11:47:13 AM (3 years ago)
Author:
alain
Message:

This version modifies the exec syscall and fixes a large number of small bugs.
The version number has been updated (0.1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/remote_sem.h

    r23 r457  
    2525#define _SEMAPHORE_H_
    2626
    27 #include <hal_types.h>
     27#include <hal_kernel_types.h>
    2828#include <xlist.h>
    2929#include <remote_spinlock.h>
     
    7777 * This function implements the SEM_INIT operation.
    7878 * It allocates memory for a remote semaphore in reference cluster, using a RPC if required,
    79  * and initializes it, using remote accesses.
     79 * and initializes it, using remote accesses from values defined by the <vaddr> and <value>
     80 * arguments. It uses also a remote access to return the extended pointer on the semaphore
     81 * in the buffer identified by the <buf_xp> argument.
    8082 *********************************************************************************************
    81  * @ vaddr    : semaphore virtual address, used as identifier.
    82  * @ value    : semaphore initial value.
    83  * @ returns 0 if success / returns ENOMEM if error.
     83 * @ vaddr     : [in] semaphore virtual address, used as identifier.
     84 * @ value     : [in] semaphore initial value.
     85 * @ sem_xp_xp : [out] extended pointer on buffer to store extended pointer on semaphore.
     86 * @ returns 0 if success / returns -1 if no memory.
    8487 ********************************************************************************************/
    8588error_t remote_sem_create( intptr_t  vaddr,
    86                            uint32_t  value );
     89                           uint32_t  value,
     90                           xptr_t    sem_xp_xp );
    8791 
    8892/****************************yy***************************************************************
     
    9195 * reference cluster, using a RPC if required.
    9296 *********************************************************************************************
    93  * @ sem_xp   : extended pointer on semaphore.
     97 * @ sem_xp   : [in] extended pointer on semaphore.
    9498 ********************************************************************************************/
    9599void remote_sem_destroy( xptr_t sem_xp );
     
    102106 *    waiting queue, block the thread, and yield.
    103107 *********************************************************************************************
    104  * @ sem_xp   : extended pointer on semaphore.
     108 * @ sem_xp   : [in] extended pointer on semaphore.
    105109 ********************************************************************************************/
    106110void remote_sem_wait( xptr_t sem_xp );
     
    111115 * - If the waiting queue is not empty, it wakes up the first waiting thread.
    112116 *********************************************************************************************
    113  * @ sem_xp   : extended pointer on semaphore.
     117 * @ sem_xp   : [in] extended pointer on semaphore.
    114118 ********************************************************************************************/
    115119void remote_sem_post( xptr_t sem_xp );
     
    119123 * It returns in the <data> buffer the semaphore current value.
    120124 *********************************************************************************************
    121  * @ sem_xp   : extended pointer on semaphore.
    122  * @ data     : [out] returned value.
     125 * @ sem_xp   : [in]  extended pointer on semaphore.
     126 * @ data     : [out] local pointer on buffer for returned value.
    123127 ********************************************************************************************/
    124128void remote_sem_get_value( xptr_t      sem_xp,
Note: See TracChangeset for help on using the changeset viewer.