Changeset d48fcc0 in mainline for uspace/lib/usb/src/pipepriv.c
- Timestamp:
- 2011-04-09T09:45:14Z (12 years ago)
- Branches:
- lfn, master, serial
- Children:
- e9ce696
- Parents:
- a546687
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipepriv.c
ra546687 rd48fcc0 42 42 * @param pipe Pipe to be exclusively accessed. 43 43 */ 44 void pipe_ acquire(usb_pipe_t *pipe)44 void pipe_start_transaction(usb_pipe_t *pipe) 45 45 { 46 46 fibril_mutex_lock(&pipe->hc_phone_mutex); … … 51 51 * @param pipe Pipe to be released from exclusive usage. 52 52 */ 53 void pipe_end_transaction(usb_pipe_t *pipe) 54 { 55 fibril_mutex_unlock(&pipe->hc_phone_mutex); 56 } 57 58 /** Ensure exclusive access to the pipe as a whole. 59 * 60 * @param pipe Pipe to be exclusively accessed. 61 */ 62 void pipe_acquire(usb_pipe_t *pipe) 63 { 64 fibril_mutex_lock(&pipe->guard); 65 } 66 67 /** Terminate exclusive access to the pipe as a whole. 68 * 69 * @param pipe Pipe to be released from exclusive usage. 70 */ 53 71 void pipe_release(usb_pipe_t *pipe) 54 72 { 55 fibril_mutex_unlock(&pipe-> hc_phone_mutex);73 fibril_mutex_unlock(&pipe->guard); 56 74 } 57 75 … … 76 94 goto another_try; 77 95 } 96 /* 97 * No locking is needed, refcount is zero and whole pipe 98 * mutex is locked. 99 */ 78 100 pipe->hc_phone = phone; 79 101 }
Note: See TracChangeset
for help on using the changeset viewer.