Changeset 683 for trunk/kernel/libk/remote_mutex.c
- Timestamp:
- Jan 13, 2021, 12:36:17 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/remote_mutex.c
r635 r683 2 2 * remote_mutex.c - POSIX mutex implementation. 3 3 * 4 * Authors Alain Greiner (2016,2017,2018,2019 )4 * Authors Alain Greiner (2016,2017,2018,2019,2020:) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 85 85 { 86 86 remote_mutex_t * mutex_ptr; 87 kmem_req_t req;88 87 89 88 // get pointer on local process descriptor … … 98 97 99 98 // allocate memory for mutex descriptor in reference cluster 100 req.type = KMEM_KCM; 101 req.order = bits_log2( sizeof(remote_mutex_t) ); 102 req.flags = AF_ZERO | AF_KERNEL; 103 mutex_ptr = kmem_remote_alloc( ref_cxy , &req ); 99 mutex_ptr = kmem_remote_alloc( ref_cxy , bits_log2(sizeof(remote_mutex_t)) , AF_ZERO ); 104 100 105 101 if( mutex_ptr == NULL ) … … 145 141 void remote_mutex_destroy( xptr_t mutex_xp ) 146 142 { 147 kmem_req_t req;148 149 143 // get pointer on local process descriptor 150 144 process_t * process = CURRENT_THREAD->process; … … 171 165 172 166 // release memory allocated for mutex descriptor 173 req.type = KMEM_KCM; 174 req.ptr = mutex_ptr; 175 kmem_remote_free( mutex_cxy , &req ); 167 kmem_remote_free( mutex_cxy , mutex_ptr , bits_log2(sizeof(remote_mutex_t)) ); 176 168 177 169 } // end remote_mutex_destroy()
Note: See TracChangeset
for help on using the changeset viewer.