Changeset 683 for trunk/kernel/kern/pipe.c
- Timestamp:
- Jan 13, 2021, 12:36:17 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/pipe.c
r669 r683 2 2 * pipe.c - single writer, single reader pipe implementation 3 3 * 4 * Author Alain Greiner (2016,2017,2018,2019,2020)4 * Author Alain Greiner (2016,2017,2018,2019,2020) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 32 32 uint32_t size ) 33 33 { 34 kmem_req_t req;35 34 remote_buf_t * buf; 36 35 pipe_t * pipe; … … 55 54 56 55 // 3. allocate memory for pipe descriptor 57 req.type = KMEM_KCM; 58 req.order = bits_log2( sizeof(pipe_t) ); 59 req.flags = AF_ZERO; 60 pipe = kmem_remote_alloc( cxy , &req ); 56 pipe = kmem_remote_alloc( cxy , bits_log2(sizeof(pipe_t)) , AF_ZERO ); 61 57 62 58 if( pipe == NULL ) … … 76 72 void pipe_destroy( xptr_t pipe_xp ) 77 73 { 78 kmem_req_t req;79 80 74 pipe_t * pipe_ptr = GET_PTR( pipe_xp ); 81 75 cxy_t pipe_cxy = GET_CXY( pipe_xp ); … … 88 82 89 83 // release pipe descriptor 90 req.type = KMEM_KCM; 91 req.ptr = pipe_ptr; 92 kmem_remote_free( pipe_cxy , &req ); 84 kmem_remote_free( pipe_cxy , pipe_ptr , bits_log2(sizeof(pipe_t)) ); 93 85 94 86 } // end pipe_destroy() 95 96 87 97 88 //////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.