=============================================================================== 00104f10 : int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 104f10: 55 push %ebp 104f11: 89 e5 mov %esp,%ebp 104f13: 57 push %edi 104f14: 56 push %esi 104f15: 53 push %ebx 104f16: 83 ec 2c sub $0x2c,%esp _Mutex_Acquire( mutex ); 104f19: c7 04 24 44 73 12 00 movl $0x127344,(%esp) 104f20: 8b 75 08 mov 0x8(%ebp),%esi 104f23: e8 38 20 00 00 call 106f60 <_Mutex_Acquire> pipe = *pipep; 104f28: 8b 1e mov (%esi),%ebx if (pipe == NULL) { 104f2a: 85 db test %ebx,%ebx 104f2c: 74 62 je 104f90 PIPE_LOCK(pipe); 104f2e: 8d 43 28 lea 0x28(%ebx),%eax 104f31: 89 04 24 mov %eax,(%esp) 104f34: e8 27 20 00 00 call 106f60 <_Mutex_Acquire> *pipep = pipe; 104f39: 89 1e mov %ebx,(%esi) _Mutex_Release( mutex ); 104f3b: c7 04 24 44 73 12 00 movl $0x127344,(%esp) 104f42: e8 89 20 00 00 call 106fd0 <_Mutex_Release> 104f47: 8b 45 0c mov 0xc(%ebp),%eax int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 104f4a: 8b 1e mov (%esi),%ebx 104f4c: 8b 10 mov (%eax),%edx prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_READWAIT(pipe); 104f4e: 8d 7b 28 lea 0x28(%ebx),%edi switch (LIBIO_ACCMODE(iop)) { 104f51: 83 e2 06 and $0x6,%edx 104f54: 83 fa 04 cmp $0x4,%edx 104f57: 0f 84 53 01 00 00 je 1050b0 104f5d: 83 fa 06 cmp $0x6,%edx 104f60: 0f 84 0a 01 00 00 je 105070 104f66: 83 fa 02 cmp $0x2,%edx 104f69: 0f 84 a1 00 00 00 je 105010 <== ALWAYS TAKEN 104f6f: 89 3c 24 mov %edi,(%esp) 104f72: e8 59 20 00 00 call 106fd0 <_Mutex_Release> PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 104f77: 31 c0 xor %eax,%eax out_error: pipe_release(pipep, iop); return err; } 104f79: 83 c4 2c add $0x2c,%esp 104f7c: 5b pop %ebx 104f7d: 5e pop %esi 104f7e: 5f pop %edi 104f7f: 5d pop %ebp 104f80: c3 ret 104f81: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 104f88: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 104f8f: 90 nop pipe = malloc(sizeof(pipe_control_t)); 104f90: c7 04 24 64 00 00 00 movl $0x64,(%esp) 104f97: e8 04 5e 00 00 call 10ada0 if (pipe == NULL) 104f9c: 85 c0 test %eax,%eax pipe = malloc(sizeof(pipe_control_t)); 104f9e: 89 c3 mov %eax,%ebx if (pipe == NULL) 104fa0: 0f 84 d3 01 00 00 je 105179 memset(pipe, 0, sizeof(pipe_control_t)); 104fa6: 8d 50 08 lea 0x8(%eax),%edx 104fa9: 31 c9 xor %ecx,%ecx 104fab: 31 c0 xor %eax,%eax 104fad: 89 0c 02 mov %ecx,(%edx,%eax,1) 104fb0: 89 4c 02 04 mov %ecx,0x4(%edx,%eax,1) 104fb4: 83 c0 08 add $0x8,%eax 104fb7: 83 f8 58 cmp $0x58,%eax 104fba: 72 f1 jb 104fad 104fbc: c7 04 02 00 00 00 00 movl $0x0,(%edx,%eax,1) pipe->Size = PIPE_BUF; 104fc3: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) pipe->Buffer = malloc(pipe->Size); 104fca: c7 04 24 00 02 00 00 movl $0x200,(%esp) 104fd1: e8 ca 5d 00 00 call 10ada0 104fd6: 89 03 mov %eax,(%ebx) if (pipe->Buffer == NULL) { 104fd8: 85 c0 test %eax,%eax 104fda: 0f 84 91 01 00 00 je 105171 <== NEVER TAKEN _Condition_Initialize_named(struct _Condition_Control *_cond, const char *_name) { struct _Condition_Control _init = _CONDITION_NAMED_INITIALIZER(_name); *_cond = _init; 104fe0: c7 43 4c d0 1f 12 00 movl $0x121fd0,0x4c(%ebx) if (c ++ == 'z') 104fe7: 0f b6 05 40 73 12 00 movzbl 0x127340,%eax 104fee: c7 43 60 da 1f 12 00 movl $0x121fda,0x60(%ebx) *_mutex = _init; 104ff5: c7 43 38 e5 1f 12 00 movl $0x121fe5,0x38(%ebx) 104ffc: 3c 7a cmp $0x7a,%al 104ffe: 0f 84 0c 01 00 00 je 105110 105004: fe c0 inc %al 105006: a2 40 73 12 00 mov %al,0x127340 10500b: e9 1e ff ff ff jmp 104f2e if (pipe->Readers ++ == 0) 105010: 8b 53 10 mov 0x10(%ebx),%edx pipe->readerCounter ++; 105013: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 105016: 8d 4a 01 lea 0x1(%edx),%ecx 105019: 85 d2 test %edx,%edx 10501b: 89 4b 10 mov %ecx,0x10(%ebx) 10501e: 0f 84 fc 00 00 00 je 105120 <== ALWAYS TAKEN if (pipe->Writers == 0) { 105024: 8b 4b 14 mov 0x14(%ebx),%ecx 105027: 85 c9 test %ecx,%ecx 105029: 0f 85 40 ff ff ff jne 104f6f 10502f: 8b 45 0c mov 0xc(%ebp),%eax 105032: 8b 10 mov (%eax),%edx if (LIBIO_NODELAY(iop)) 105034: f6 c2 01 test $0x1,%dl 105037: 0f 85 32 ff ff ff jne 104f6f prevCounter = pipe->writerCounter; 10503d: 8b 43 24 mov 0x24(%ebx),%eax PIPE_READWAIT(pipe); 105040: 8d 73 3c lea 0x3c(%ebx),%esi prevCounter = pipe->writerCounter; 105043: 89 45 e4 mov %eax,-0x1c(%ebp) err = -EINTR; 105046: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 10504d: 8d 76 00 lea 0x0(%esi),%esi _Condition_Wait( condition_variable, mutex ); 105050: 89 7c 24 04 mov %edi,0x4(%esp) 105054: 89 34 24 mov %esi,(%esp) 105057: e8 b4 0a 00 00 call 105b10 <_Condition_Wait> } while (prevCounter == pipe->writerCounter); 10505c: 8b 45 e4 mov -0x1c(%ebp),%eax 10505f: 39 43 24 cmp %eax,0x24(%ebx) 105062: 74 ec je 105050 <== NEVER TAKEN 105064: e9 06 ff ff ff jmp 104f6f 105069: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi if (pipe->Readers ++ == 0) 105070: 8b 53 10 mov 0x10(%ebx),%edx pipe->readerCounter ++; 105073: ff 43 20 incl 0x20(%ebx) if (pipe->Readers ++ == 0) 105076: 8d 4a 01 lea 0x1(%edx),%ecx 105079: 85 d2 test %edx,%edx 10507b: 89 4b 10 mov %ecx,0x10(%ebx) 10507e: 0f 84 ac 00 00 00 je 105130 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) 105084: 8b 53 14 mov 0x14(%ebx),%edx pipe->writerCounter ++; 105087: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 10508a: 8d 4a 01 lea 0x1(%edx),%ecx 10508d: 85 d2 test %edx,%edx 10508f: 89 4b 14 mov %ecx,0x14(%ebx) 105092: 0f 85 d7 fe ff ff jne 104f6f <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 105098: 83 c3 3c add $0x3c,%ebx 10509b: 89 1c 24 mov %ebx,(%esp) _Condition_Broadcast( condition_variable ); 10509e: e8 cd 0a 00 00 call 105b70 <_Condition_Broadcast> } 1050a3: e9 c7 fe ff ff jmp 104f6f 1050a8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 1050af: 90 nop if (pipe->Writers ++ == 0) 1050b0: 8b 53 14 mov 0x14(%ebx),%edx pipe->writerCounter ++; 1050b3: ff 43 24 incl 0x24(%ebx) if (pipe->Writers ++ == 0) 1050b6: 8d 4a 01 lea 0x1(%edx),%ecx 1050b9: 85 d2 test %edx,%edx 1050bb: 89 4b 14 mov %ecx,0x14(%ebx) 1050be: 0f 84 7c 00 00 00 je 105140 <== ALWAYS TAKEN if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 1050c4: 8b 53 10 mov 0x10(%ebx),%edx 1050c7: 85 d2 test %edx,%edx 1050c9: 0f 85 a0 fe ff ff jne 104f6f 1050cf: 8b 45 0c mov 0xc(%ebp),%eax 1050d2: 8b 10 mov (%eax),%edx 1050d4: f6 c2 01 test $0x1,%dl 1050d7: 75 77 jne 105150 if (pipe->Readers == 0) { 1050d9: 8b 43 10 mov 0x10(%ebx),%eax 1050dc: 85 c0 test %eax,%eax 1050de: 0f 85 8b fe ff ff jne 104f6f <== NEVER TAKEN prevCounter = pipe->readerCounter; 1050e4: 8b 43 20 mov 0x20(%ebx),%eax PIPE_WAKEUPWRITERS(pipe); 1050e7: 8d 73 50 lea 0x50(%ebx),%esi prevCounter = pipe->readerCounter; 1050ea: 89 45 e4 mov %eax,-0x1c(%ebp) err = -EINTR; 1050ed: 8d 76 00 lea 0x0(%esi),%esi _Condition_Wait( condition_variable, mutex ); 1050f0: 89 7c 24 04 mov %edi,0x4(%esp) 1050f4: 89 34 24 mov %esi,(%esp) 1050f7: e8 14 0a 00 00 call 105b10 <_Condition_Wait> } while (prevCounter == pipe->readerCounter); 1050fc: 8b 45 e4 mov -0x1c(%ebp),%eax 1050ff: 39 43 20 cmp %eax,0x20(%ebx) 105102: 74 ec je 1050f0 <== NEVER TAKEN 105104: e9 66 fe ff ff jmp 104f6f 105109: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi c = 'a'; 105110: b0 61 mov $0x61,%al 105112: a2 40 73 12 00 mov %al,0x127340 if (err) { 105117: e9 12 fe ff ff jmp 104f2e 10511c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi PIPE_WAKEUPWRITERS(pipe); 105120: 8d 53 50 lea 0x50(%ebx),%edx 105123: 89 14 24 mov %edx,(%esp) _Condition_Broadcast( condition_variable ); 105126: e8 45 0a 00 00 call 105b70 <_Condition_Broadcast> } 10512b: e9 f4 fe ff ff jmp 105024 PIPE_WAKEUPWRITERS(pipe); 105130: 8d 53 50 lea 0x50(%ebx),%edx 105133: 89 14 24 mov %edx,(%esp) _Condition_Broadcast( condition_variable ); 105136: e8 35 0a 00 00 call 105b70 <_Condition_Broadcast> } 10513b: e9 44 ff ff ff jmp 105084 PIPE_WAKEUPREADERS(pipe); 105140: 8d 53 3c lea 0x3c(%ebx),%edx 105143: 89 14 24 mov %edx,(%esp) _Condition_Broadcast( condition_variable ); 105146: e8 25 0a 00 00 call 105b70 <_Condition_Broadcast> } 10514b: e9 74 ff ff ff jmp 1050c4 _Mutex_Release( mutex ); 105150: 89 3c 24 mov %edi,(%esp) 105153: e8 78 1e 00 00 call 106fd0 <_Mutex_Release> pipe_release(pipep, iop); 105158: 8b 45 0c mov 0xc(%ebp),%eax 10515b: 89 34 24 mov %esi,(%esp) 10515e: 89 44 24 04 mov %eax,0x4(%esp) 105162: e8 d9 fc ff ff call 104e40 return err; 105167: b8 fa ff ff ff mov $0xfffffffa,%eax 10516c: e9 08 fe ff ff jmp 104f79 free(pipe); 105171: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 105174: e8 d7 57 00 00 call 10a950 <== NOT EXECUTED 105179: c7 04 24 44 73 12 00 movl $0x127344,(%esp) 105180: e8 4b 1e 00 00 call 106fd0 <_Mutex_Release> return -ENOMEM; 105185: b8 f4 ff ff ff mov $0xfffffff4,%eax 10518a: e9 ea fd ff ff jmp 104f79 10518f: 90 nop =============================================================================== 00105100 : static uint16_t rtems_pipe_no = 0; int pipe( int filsdes[2] ) { 105100: 55 push %ebp 105101: 89 e5 mov %esp,%ebp 105103: 57 push %edi 105104: 56 push %esi 105105: 53 push %ebx 105106: 83 ec 2c sub $0x2c,%esp 105109: 8b 7d 08 mov 0x8(%ebp),%edi rtems_libio_t *iop; int err = 0; if (filsdes == NULL) 10510c: 85 ff test %edi,%edi 10510e: 0f 84 46 01 00 00 je 10525a rtems_set_errno_and_return_minus_one( EFAULT ); if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0) 105114: c7 04 24 90 16 12 00 movl $0x121690,(%esp) 10511b: be ff 01 00 00 mov $0x1ff,%esi 105120: 89 74 24 04 mov %esi,0x4(%esp) 105124: e8 a7 58 00 00 call 10a9d0 105129: 85 c0 test %eax,%eax 10512b: 0f 85 1f 01 00 00 jne 105250 return -1; /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 105131: 0f b7 05 30 9b 12 00 movzwl 0x129b30,%eax 105138: b9 95 16 12 00 mov $0x121695,%ecx /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 10513d: bb 80 01 00 00 mov $0x180,%ebx sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 105142: 89 4c 24 04 mov %ecx,0x4(%esp) memcpy(fifopath, "/tmp/.fifo", 10); 105146: 8d 75 d9 lea -0x27(%ebp),%esi 105149: c7 45 d9 2f 74 6d 70 movl $0x706d742f,-0x27(%ebp) 105150: c7 45 dd 2f 2e 66 69 movl $0x69662e2f,-0x23(%ebp) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 105157: 89 44 24 08 mov %eax,0x8(%esp) 10515b: 8d 50 01 lea 0x1(%eax),%edx 10515e: 66 89 15 30 9b 12 00 mov %dx,0x129b30 105165: 8d 45 e3 lea -0x1d(%ebp),%eax 105168: 89 04 24 mov %eax,(%esp) memcpy(fifopath, "/tmp/.fifo", 10); 10516b: 66 c7 45 e1 66 6f movw $0x6f66,-0x1f(%ebp) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 105171: e8 0a 54 01 00 call 11a580 while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 105176: 89 5c 24 04 mov %ebx,0x4(%esp) 10517a: 89 34 24 mov %esi,(%esp) 10517d: e8 0e 58 00 00 call 10a990 105182: 85 c0 test %eax,%eax 105184: 89 c3 mov %eax,%ebx 105186: 75 58 jne 1051e0 <== NEVER TAKEN return -1; /* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */ } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 105188: 89 34 24 mov %esi,(%esp) 10518b: ba 00 40 00 00 mov $0x4000,%edx 105190: 89 54 24 04 mov %edx,0x4(%esp) 105194: e8 67 c0 ff ff call 101200 105199: 89 07 mov %eax,(%edi) if (filsdes[0] < 0) { 10519b: 85 c0 test %eax,%eax 10519d: 78 61 js 105200 return &rtems_libio_iops[ fd ]; 10519f: 8d 14 80 lea (%eax,%eax,4),%edx 1051a2: 8d 04 50 lea (%eax,%edx,2),%eax 1051a5: 8d 04 85 c0 85 12 00 lea 0x1285c0(,%eax,4),%eax _ISR_Local_disable( level ); 1051ac: 9c pushf 1051ad: fa cli 1051ae: 5a pop %edx *obj = val & arg; 1051af: 83 20 fe andl $0xfffffffe,(%eax) _ISR_Local_enable( level ); 1051b2: 52 push %edx 1051b3: 9d popf else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); rtems_libio_iop_flags_clear( iop, LIBIO_FLAGS_NO_DELAY ); filsdes[1] = open(fifopath, O_WRONLY); 1051b4: 89 34 24 mov %esi,(%esp) 1051b7: b8 01 00 00 00 mov $0x1,%eax 1051bc: 89 44 24 04 mov %eax,0x4(%esp) 1051c0: e8 3b c0 ff ff call 101200 1051c5: 89 47 04 mov %eax,0x4(%edi) if (filsdes[1] < 0) { 1051c8: 85 c0 test %eax,%eax 1051ca: 78 64 js 105230 err = errno; close(filsdes[0]); } unlink(fifopath); 1051cc: 89 34 24 mov %esi,(%esp) 1051cf: e8 2c d1 ff ff call 102300 } if(err != 0) rtems_set_errno_and_return_minus_one(err); return 0; } 1051d4: 83 c4 2c add $0x2c,%esp 1051d7: 89 d8 mov %ebx,%eax 1051d9: 5b pop %ebx 1051da: 5e pop %esi 1051db: 5f pop %edi 1051dc: 5d pop %ebp 1051dd: c3 ret 1051de: 66 90 xchg %ax,%ax if (errno != EEXIST){ 1051e0: e8 7b 50 01 00 call 11a260 <__errno> <== NOT EXECUTED return -1; 1051e5: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED } 1051ea: 83 c4 2c add $0x2c,%esp <== NOT EXECUTED 1051ed: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1051ef: 5b pop %ebx <== NOT EXECUTED 1051f0: 5e pop %esi <== NOT EXECUTED 1051f1: 5f pop %edi <== NOT EXECUTED 1051f2: 5d pop %ebp <== NOT EXECUTED 1051f3: c3 ret <== NOT EXECUTED 1051f4: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED 1051fb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED 1051ff: 90 nop <== NOT EXECUTED err = errno; 105200: e8 5b 50 01 00 call 11a260 <__errno> 105205: 8b 18 mov (%eax),%ebx unlink(fifopath); 105207: 89 34 24 mov %esi,(%esp) 10520a: e8 f1 d0 ff ff call 102300 if(err != 0) 10520f: 85 db test %ebx,%ebx 105211: 74 c1 je 1051d4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(err); 105213: e8 48 50 01 00 call 11a260 <__errno> 105218: 89 18 mov %ebx,(%eax) 10521a: bb ff ff ff ff mov $0xffffffff,%ebx 10521f: eb b3 jmp 1051d4 105221: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 105228: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 10522f: 90 nop err = errno; 105230: e8 2b 50 01 00 call 11a260 <__errno> 105235: 8b 18 mov (%eax),%ebx close(filsdes[0]); 105237: 8b 07 mov (%edi),%eax 105239: 89 04 24 mov %eax,(%esp) 10523c: e8 7f b3 ff ff call 1005c0 unlink(fifopath); 105241: 89 34 24 mov %esi,(%esp) 105244: e8 b7 d0 ff ff call 102300 105249: eb c4 jmp 10520f 10524b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 10524f: 90 nop return -1; 105250: bb ff ff ff ff mov $0xffffffff,%ebx 105255: e9 7a ff ff ff jmp 1051d4 rtems_set_errno_and_return_minus_one( EFAULT ); 10525a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 105260: e8 fb 4f 01 00 call 11a260 <__errno> 105265: bb ff ff ff ff mov $0xffffffff,%ebx 10526a: c7 00 0e 00 00 00 movl $0xe,(%eax) 105270: e9 5f ff ff ff jmp 1051d4 105275: 90 nop 105276: 90 nop 105277: 90 nop 105278: 90 nop 105279: 90 nop 10527a: 90 nop 10527b: 90 nop 10527c: 90 nop 10527d: 90 nop 10527e: 90 nop 10527f: 90 nop =============================================================================== 00105190 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 105190: 55 push %ebp 105191: 89 e5 mov %esp,%ebp 105193: 57 push %edi 105194: 56 push %esi 105195: 53 push %ebx 105196: 83 ec 2c sub $0x2c,%esp 105199: 8b 5d 08 mov 0x8(%ebp),%ebx 10519c: 8b 75 14 mov 0x14(%ebp),%esi int chunk, chunk1, read = 0, ret = 0; PIPE_LOCK(pipe); 10519f: 8d 43 28 lea 0x28(%ebx),%eax _Mutex_Acquire( mutex ); 1051a2: 89 04 24 mov %eax,(%esp) 1051a5: 89 45 e4 mov %eax,-0x1c(%ebp) 1051a8: e8 b3 1d 00 00 call 106f60 <_Mutex_Acquire> while (PIPE_EMPTY(pipe)) { 1051ad: 8b 43 0c mov 0xc(%ebx),%eax 1051b0: 85 c0 test %eax,%eax 1051b2: 75 5e jne 105212 goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_READWAIT(pipe); 1051b4: 8d 7b 3c lea 0x3c(%ebx),%edi 1051b7: 89 f8 mov %edi,%eax 1051b9: 89 df mov %ebx,%edi 1051bb: 89 c3 mov %eax,%ebx 1051bd: eb 27 jmp 1051e6 1051bf: 90 nop 1051c0: 8b 06 mov (%esi),%eax if (LIBIO_NODELAY(iop)) { 1051c2: a8 01 test $0x1,%al 1051c4: 0f 85 c6 00 00 00 jne 105290 _Condition_Wait( condition_variable, mutex ); 1051ca: 8b 45 e4 mov -0x1c(%ebp),%eax pipe->waitingReaders ++; 1051cd: ff 47 18 incl 0x18(%edi) PIPE_READWAIT(pipe); 1051d0: 89 1c 24 mov %ebx,(%esp) 1051d3: 89 44 24 04 mov %eax,0x4(%esp) 1051d7: e8 34 09 00 00 call 105b10 <_Condition_Wait> while (PIPE_EMPTY(pipe)) { 1051dc: 8b 47 0c mov 0xc(%edi),%eax pipe->waitingReaders --; 1051df: ff 4f 18 decl 0x18(%edi) while (PIPE_EMPTY(pipe)) { 1051e2: 85 c0 test %eax,%eax 1051e4: 75 2a jne 105210 <== ALWAYS TAKEN if (pipe->Writers == 0) 1051e6: 8b 4f 14 mov 0x14(%edi),%ecx 1051e9: 85 c9 test %ecx,%ecx 1051eb: 75 d3 jne 1051c0 int chunk, chunk1, read = 0, ret = 0; 1051ed: 31 c0 xor %eax,%eax 1051ef: 89 45 e0 mov %eax,-0x20(%ebp) _Mutex_Release( mutex ); 1051f2: 8b 45 e4 mov -0x1c(%ebp),%eax 1051f5: 89 04 24 mov %eax,(%esp) 1051f8: e8 d3 1d 00 00 call 106fd0 <_Mutex_Release> 1051fd: 8b 45 e0 mov -0x20(%ebp),%eax PIPE_UNLOCK(pipe); if (read > 0) return read; return ret; } 105200: 83 c4 2c add $0x2c,%esp 105203: 5b pop %ebx 105204: 5e pop %esi 105205: 5f pop %edi 105206: 5d pop %ebp 105207: c3 ret 105208: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 10520f: 90 nop 105210: 89 fb mov %edi,%ebx chunk = MIN(count - read, pipe->Length); 105212: 3b 45 10 cmp 0x10(%ebp),%eax 105215: 89 45 e0 mov %eax,-0x20(%ebp) 105218: 0f 87 e2 00 00 00 ja 105300 chunk1 = pipe->Size - pipe->Start; 10521e: 8b 73 08 mov 0x8(%ebx),%esi 105221: 8b 43 04 mov 0x4(%ebx),%eax memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 105224: 8b 13 mov (%ebx),%edx chunk1 = pipe->Size - pipe->Start; 105226: 29 f0 sub %esi,%eax memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 105228: 01 d6 add %edx,%esi if (chunk > chunk1) { 10522a: 39 45 e0 cmp %eax,-0x20(%ebp) 10522d: 7e 71 jle 1052a0 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 10522f: 83 f8 08 cmp $0x8,%eax 105232: 8b 7d 0c mov 0xc(%ebp),%edi 105235: 89 c1 mov %eax,%ecx 105237: 0f 83 ff 00 00 00 jae 10533c <== ALWAYS TAKEN 10523d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 10523f: 8b 4d e0 mov -0x20(%ebp),%ecx 105242: 8b 55 0c mov 0xc(%ebp),%edx 105245: 8b 33 mov (%ebx),%esi 105247: 29 c1 sub %eax,%ecx 105249: 8d 3c 02 lea (%edx,%eax,1),%edi 10524c: 83 f9 08 cmp $0x8,%ecx 10524f: 72 5c jb 1052ad <== NEVER TAKEN 105251: f7 c7 01 00 00 00 test $0x1,%edi 105257: 0f 85 23 01 00 00 jne 105380 <== NEVER TAKEN memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10525d: f7 c7 02 00 00 00 test $0x2,%edi 105263: 0f 85 02 01 00 00 jne 10536b 105269: f7 c7 04 00 00 00 test $0x4,%edi 10526f: 74 3c je 1052ad 105271: 8b 06 mov (%esi),%eax 105273: 83 c7 04 add $0x4,%edi 105276: 83 c6 04 add $0x4,%esi 105279: 83 e9 04 sub $0x4,%ecx 10527c: 89 47 fc mov %eax,-0x4(%edi) 10527f: eb 2c jmp 1052ad 105281: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 105288: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 10528f: 90 nop ret = -EAGAIN; 105290: b8 f5 ff ff ff mov $0xfffffff5,%eax 105295: e9 55 ff ff ff jmp 1051ef 10529a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 1052a0: 8b 45 e0 mov -0x20(%ebp),%eax 1052a3: 8b 7d 0c mov 0xc(%ebp),%edi 1052a6: 83 f8 08 cmp $0x8,%eax 1052a9: 89 c1 mov %eax,%ecx 1052ab: 73 70 jae 10531d <== ALWAYS TAKEN 1052ad: f3 a4 rep movsb %ds:(%esi),%es:(%edi) pipe->Start %= pipe->Size; 1052af: 31 d2 xor %edx,%edx pipe->Start += chunk; 1052b1: 8b 4d e0 mov -0x20(%ebp),%ecx 1052b4: 8b 43 08 mov 0x8(%ebx),%eax 1052b7: 01 c8 add %ecx,%eax pipe->Start %= pipe->Size; 1052b9: f7 73 04 divl 0x4(%ebx) pipe->Length -= chunk; 1052bc: 29 4b 0c sub %ecx,0xc(%ebx) pipe->Start %= pipe->Size; 1052bf: 89 53 08 mov %edx,0x8(%ebx) if (PIPE_EMPTY(pipe)) 1052c2: 75 07 jne 1052cb pipe->Start = 0; 1052c4: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) if (pipe->waitingWriters > 0) 1052cb: 8b 43 1c mov 0x1c(%ebx),%eax 1052ce: 85 c0 test %eax,%eax 1052d0: 75 3e jne 105310 1052d2: 8b 45 e4 mov -0x1c(%ebp),%eax 1052d5: 89 04 24 mov %eax,(%esp) 1052d8: e8 f3 1c 00 00 call 106fd0 <_Mutex_Release> if (read > 0) 1052dd: 8b 55 e0 mov -0x20(%ebp),%edx } 1052e0: 83 c4 2c add $0x2c,%esp 1052e3: 5b pop %ebx 1052e4: 5e pop %esi 1052e5: 89 d0 mov %edx,%eax 1052e7: f7 d0 not %eax 1052e9: c1 f8 1f sar $0x1f,%eax 1052ec: 5f pop %edi 1052ed: 21 d0 and %edx,%eax 1052ef: 5d pop %ebp 1052f0: c3 ret 1052f1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 1052f8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 1052ff: 90 nop chunk = MIN(count - read, pipe->Length); 105300: 8b 45 10 mov 0x10(%ebp),%eax 105303: 89 45 e0 mov %eax,-0x20(%ebp) 105306: e9 13 ff ff ff jmp 10521e 10530b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 10530f: 90 nop PIPE_WAKEUPWRITERS(pipe); 105310: 83 c3 50 add $0x50,%ebx 105313: 89 1c 24 mov %ebx,(%esp) _Condition_Broadcast( condition_variable ); 105316: e8 55 08 00 00 call 105b70 <_Condition_Broadcast> } 10531b: eb b5 jmp 1052d2 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10531d: f7 c7 01 00 00 00 test $0x1,%edi 105323: 0f 84 34 ff ff ff je 10525d <== ALWAYS TAKEN 105329: 0f b6 06 movzbl (%esi),%eax <== NOT EXECUTED 10532c: 47 inc %edi <== NOT EXECUTED 10532d: 46 inc %esi <== NOT EXECUTED 10532e: 88 47 ff mov %al,-0x1(%edi) <== NOT EXECUTED 105331: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 105334: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED 105337: e9 21 ff ff ff jmp 10525d <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 10533c: f7 c7 01 00 00 00 test $0x1,%edi 105342: 75 5c jne 1053a0 <== NEVER TAKEN 105344: f7 c7 02 00 00 00 test $0x2,%edi 10534a: 75 42 jne 10538e <== NEVER TAKEN 10534c: f7 c7 04 00 00 00 test $0x4,%edi 105352: 0f 84 e5 fe ff ff je 10523d <== NEVER TAKEN 105358: 8b 16 mov (%esi),%edx 10535a: 83 c7 04 add $0x4,%edi 10535d: 83 c6 04 add $0x4,%esi 105360: 83 e9 04 sub $0x4,%ecx 105363: 89 57 fc mov %edx,-0x4(%edi) 105366: e9 d2 fe ff ff jmp 10523d memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10536b: 0f b7 06 movzwl (%esi),%eax 10536e: 83 c7 02 add $0x2,%edi 105371: 83 c6 02 add $0x2,%esi 105374: 83 e9 02 sub $0x2,%ecx 105377: 66 89 47 fe mov %ax,-0x2(%edi) 10537b: e9 e9 fe ff ff jmp 105269 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 105380: 0f b6 06 movzbl (%esi),%eax <== NOT EXECUTED 105383: 47 inc %edi <== NOT EXECUTED 105384: 46 inc %esi <== NOT EXECUTED 105385: 49 dec %ecx <== NOT EXECUTED 105386: 88 47 ff mov %al,-0x1(%edi) <== NOT EXECUTED 105389: e9 cf fe ff ff jmp 10525d <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 10538e: 0f b7 16 movzwl (%esi),%edx <== NOT EXECUTED 105391: 83 c7 02 add $0x2,%edi <== NOT EXECUTED 105394: 83 c6 02 add $0x2,%esi <== NOT EXECUTED 105397: 83 e9 02 sub $0x2,%ecx <== NOT EXECUTED 10539a: 66 89 57 fe mov %dx,-0x2(%edi) <== NOT EXECUTED 10539e: eb ac jmp 10534c <== NOT EXECUTED 1053a0: 0f b6 16 movzbl (%esi),%edx <== NOT EXECUTED 1053a3: 46 inc %esi <== NOT EXECUTED 1053a4: 88 17 mov %dl,(%edi) <== NOT EXECUTED 1053a6: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 1053a9: 8d 79 01 lea 0x1(%ecx),%edi <== NOT EXECUTED 1053ac: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED 1053af: eb 93 jmp 105344 <== NOT EXECUTED 1053b1: 90 nop 1053b2: 90 nop 1053b3: 90 nop 1053b4: 90 nop 1053b5: 90 nop 1053b6: 90 nop 1053b7: 90 nop 1053b8: 90 nop 1053b9: 90 nop 1053ba: 90 nop 1053bb: 90 nop 1053bc: 90 nop 1053bd: 90 nop 1053be: 90 nop 1053bf: 90 nop =============================================================================== 00104e40 : void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 104e40: 55 push %ebp 104e41: 89 e5 mov %esp,%ebp 104e43: 83 ec 38 sub $0x38,%esp 104e46: 89 75 f8 mov %esi,-0x8(%ebp) 104e49: 8b 75 08 mov 0x8(%ebp),%esi 104e4c: 89 5d f4 mov %ebx,-0xc(%ebp) 104e4f: 89 7d fc mov %edi,-0x4(%ebp) 104e52: 8b 7d 0c mov 0xc(%ebp),%edi pipe_control_t *pipe = *pipep; 104e55: 8b 1e mov (%esi),%ebx mutex->_Queue._name = name; } static __inline void rtems_mutex_lock( rtems_mutex *mutex ) { _Mutex_Acquire( mutex ); 104e57: c7 04 24 44 73 12 00 movl $0x127344,(%esp) 104e5e: e8 fd 20 00 00 call 106f60 <_Mutex_Acquire> uint32_t mode; pipe_lock(); PIPE_LOCK(pipe); 104e63: 8d 53 28 lea 0x28(%ebx),%edx 104e66: 89 14 24 mov %edx,(%esp) 104e69: 89 55 e4 mov %edx,-0x1c(%ebp) 104e6c: e8 ef 20 00 00 call 106f60 <_Mutex_Acquire> 104e71: 8b 07 mov (%edi),%eax mode = LIBIO_ACCMODE(iop); 104e73: 89 c7 mov %eax,%edi if (mode & LIBIO_FLAGS_READ) 104e75: 8b 55 e4 mov -0x1c(%ebp),%edx mode = LIBIO_ACCMODE(iop); 104e78: 83 e7 06 and $0x6,%edi if (mode & LIBIO_FLAGS_READ) 104e7b: a8 02 test $0x2,%al 104e7d: 74 03 je 104e82 pipe->Readers --; 104e7f: ff 4b 10 decl 0x10(%ebx) if (mode & LIBIO_FLAGS_WRITE) 104e82: a8 04 test $0x4,%al 104e84: 74 03 je 104e89 pipe->Writers --; 104e86: ff 4b 14 decl 0x14(%ebx) } static __inline void rtems_mutex_unlock( rtems_mutex *mutex ) { _Mutex_Release( mutex ); 104e89: 89 14 24 mov %edx,(%esp) 104e8c: e8 3f 21 00 00 call 106fd0 <_Mutex_Release> PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 104e91: 8b 4b 10 mov 0x10(%ebx),%ecx 104e94: 85 c9 test %ecx,%ecx 104e96: 74 38 je 104ed0 *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 104e98: 8b 43 14 mov 0x14(%ebx),%eax 104e9b: 85 c0 test %eax,%eax 104e9d: 75 10 jne 104eaf <== NEVER TAKEN 104e9f: 83 ff 02 cmp $0x2,%edi 104ea2: 74 0b je 104eaf <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 104ea4: 83 c3 3c add $0x3c,%ebx 104ea7: 89 1c 24 mov %ebx,(%esp) static __inline void rtems_condition_variable_broadcast( rtems_condition_variable *condition_variable ) { _Condition_Broadcast( condition_variable ); 104eaa: e8 c1 0c 00 00 call 105b70 <_Condition_Broadcast> rtems_libio_iop_flags_clear( iop, LIBIO_FLAGS_OPEN ); if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return; #endif } 104eaf: 8b 5d f4 mov -0xc(%ebp),%ebx _Mutex_Release( mutex ); 104eb2: c7 45 08 44 73 12 00 movl $0x127344,0x8(%ebp) 104eb9: 8b 75 f8 mov -0x8(%ebp),%esi 104ebc: 8b 7d fc mov -0x4(%ebp),%edi 104ebf: 89 ec mov %ebp,%esp 104ec1: 5d pop %ebp 104ec2: e9 09 21 00 00 jmp 106fd0 <_Mutex_Release> 104ec7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 104ece: 66 90 xchg %ax,%ax if (pipe->Readers == 0 && pipe->Writers == 0) { 104ed0: 8b 53 14 mov 0x14(%ebx),%edx 104ed3: 85 d2 test %edx,%edx 104ed5: 74 19 je 104ef0 else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 104ed7: 83 ff 04 cmp $0x4,%edi 104eda: 74 d3 je 104eaf <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 104edc: 83 c3 50 add $0x50,%ebx 104edf: 89 1c 24 mov %ebx,(%esp) _Condition_Broadcast( condition_variable ); 104ee2: e8 89 0c 00 00 call 105b70 <_Condition_Broadcast> } 104ee7: eb c6 jmp 104eaf 104ee9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi free(pipe->Buffer); 104ef0: 8b 03 mov (%ebx),%eax 104ef2: 89 04 24 mov %eax,(%esp) 104ef5: e8 56 5a 00 00 call 10a950 free(pipe); 104efa: 89 1c 24 mov %ebx,(%esp) 104efd: e8 4e 5a 00 00 call 10a950 *pipep = NULL; 104f02: c7 06 00 00 00 00 movl $0x0,(%esi) 104f08: eb a5 jmp 104eaf 104f0a: 90 nop 104f0b: 90 nop 104f0c: 90 nop 104f0d: 90 nop 104f0e: 90 nop 104f0f: 90 nop =============================================================================== 001053c0 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 1053c0: 55 push %ebp 1053c1: 89 e5 mov %esp,%ebp 1053c3: 57 push %edi 1053c4: 56 push %esi 1053c5: 53 push %ebx 1053c6: 83 ec 3c sub $0x3c,%esp int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; 1053c9: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) if (count == 0) 1053d0: 8b 75 10 mov 0x10(%ebp),%esi { 1053d3: 8b 5d 08 mov 0x8(%ebp),%ebx if (count == 0) 1053d6: 85 f6 test %esi,%esi 1053d8: 75 16 jne 1053f0 <== ALWAYS TAKEN #endif if (written > 0) return written; return ret; } 1053da: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1053dd: 83 c4 3c add $0x3c,%esp <== NOT EXECUTED 1053e0: 5b pop %ebx <== NOT EXECUTED 1053e1: 5e pop %esi <== NOT EXECUTED 1053e2: 5f pop %edi <== NOT EXECUTED 1053e3: 5d pop %ebp <== NOT EXECUTED 1053e4: c3 ret <== NOT EXECUTED 1053e5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED 1053ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED PIPE_LOCK(pipe); 1053f0: 8d 43 28 lea 0x28(%ebx),%eax _Mutex_Acquire( mutex ); 1053f3: 89 04 24 mov %eax,(%esp) 1053f6: 89 45 e4 mov %eax,-0x1c(%ebp) 1053f9: e8 62 1b 00 00 call 106f60 <_Mutex_Acquire> if (pipe->Readers == 0) { 1053fe: 8b 4b 10 mov 0x10(%ebx),%ecx 105401: 85 c9 test %ecx,%ecx 105403: 0f 84 17 01 00 00 je 105520 chunk = count <= pipe->Size ? count : 1; 105409: 8b 4b 04 mov 0x4(%ebx),%ecx 10540c: 8b 45 10 mov 0x10(%ebp),%eax 10540f: 39 c1 cmp %eax,%ecx 105411: 0f 82 f9 00 00 00 jb 105510 <== NEVER TAKEN 105417: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) 10541e: 89 c6 mov %eax,%esi while (written < count) { 105420: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) PIPE_WRITEWAIT(pipe); 105427: 8d 43 50 lea 0x50(%ebx),%eax 10542a: 89 45 e0 mov %eax,-0x20(%ebp) 10542d: eb 34 jmp 105463 10542f: 90 nop 105430: 8b 45 14 mov 0x14(%ebp),%eax 105433: 8b 00 mov (%eax),%eax if (LIBIO_NODELAY(iop)) { 105435: a8 01 test $0x1,%al 105437: 0f 85 23 01 00 00 jne 105560 _Condition_Wait( condition_variable, mutex ); 10543d: 8b 45 e4 mov -0x1c(%ebp),%eax pipe->waitingWriters ++; 105440: ff 43 1c incl 0x1c(%ebx) 105443: 89 44 24 04 mov %eax,0x4(%esp) PIPE_WRITEWAIT(pipe); 105447: 8b 45 e0 mov -0x20(%ebp),%eax 10544a: 89 04 24 mov %eax,(%esp) 10544d: e8 be 06 00 00 call 105b10 <_Condition_Wait> if (pipe->Readers == 0) { 105452: 8b 43 10 mov 0x10(%ebx),%eax pipe->waitingWriters --; 105455: ff 4b 1c decl 0x1c(%ebx) if (pipe->Readers == 0) { 105458: 85 c0 test %eax,%eax 10545a: 0f 84 30 01 00 00 je 105590 <== NEVER TAKEN while (PIPE_SPACE(pipe) < chunk) { 105460: 8b 4b 04 mov 0x4(%ebx),%ecx 105463: 8b 43 0c mov 0xc(%ebx),%eax 105466: 89 ca mov %ecx,%edx 105468: 29 c2 sub %eax,%edx 10546a: 39 f2 cmp %esi,%edx 10546c: 72 c2 jb 105430 chunk = MIN(count - written, PIPE_SPACE(pipe)); 10546e: 8b 7d 10 mov 0x10(%ebp),%edi 105471: 8b 75 d4 mov -0x2c(%ebp),%esi 105474: 29 f7 sub %esi,%edi 105476: 89 7d d8 mov %edi,-0x28(%ebp) 105479: 39 d7 cmp %edx,%edi 10547b: 76 03 jbe 105480 <== ALWAYS TAKEN 10547d: 89 55 d8 mov %edx,-0x28(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 105480: 8b 53 08 mov 0x8(%ebx),%edx memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 105483: 8b 75 0c mov 0xc(%ebp),%esi 105486: 8b 3b mov (%ebx),%edi chunk1 = pipe->Size - PIPE_WSTART(pipe); 105488: 01 d0 add %edx,%eax 10548a: 31 d2 xor %edx,%edx 10548c: f7 f1 div %ecx 10548e: 89 c8 mov %ecx,%eax memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 105490: 8b 4d d4 mov -0x2c(%ebp),%ecx 105493: 01 f1 add %esi,%ecx chunk1 = pipe->Size - PIPE_WSTART(pipe); 105495: 29 d0 sub %edx,%eax memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 105497: 01 fa add %edi,%edx if (chunk > chunk1) { 105499: 39 45 d8 cmp %eax,-0x28(%ebp) 10549c: 0f 8e 1e 01 00 00 jle 1055c0 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 1054a2: 89 45 d0 mov %eax,-0x30(%ebp) 1054a5: 83 f8 08 cmp $0x8,%eax 1054a8: 89 d7 mov %edx,%edi 1054aa: 89 ce mov %ecx,%esi 1054ac: 0f 83 a3 01 00 00 jae 105655 <== ALWAYS TAKEN 1054b2: 8b 4d d0 mov -0x30(%ebp),%ecx 1054b5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 1054b7: 8b 55 d4 mov -0x2c(%ebp),%edx 1054ba: 8b 4d d8 mov -0x28(%ebp),%ecx 1054bd: 8b 7d 0c mov 0xc(%ebp),%edi 1054c0: 8b 33 mov (%ebx),%esi 1054c2: 01 c2 add %eax,%edx 1054c4: 29 c1 sub %eax,%ecx 1054c6: 01 fa add %edi,%edx 1054c8: 83 f9 08 cmp $0x8,%ecx 1054cb: 89 f7 mov %esi,%edi 1054cd: 89 d0 mov %edx,%eax 1054cf: 0f 83 49 01 00 00 jae 10561e <== ALWAYS TAKEN 1054d5: 89 c6 mov %eax,%esi 1054d7: f3 a4 rep movsb %ds:(%esi),%es:(%edi) if (pipe->waitingReaders > 0) 1054d9: 8b 4b 18 mov 0x18(%ebx),%ecx pipe->Length += chunk; 1054dc: 8b 45 d8 mov -0x28(%ebp),%eax 1054df: 01 43 0c add %eax,0xc(%ebx) if (pipe->waitingReaders > 0) 1054e2: 85 c9 test %ecx,%ecx 1054e4: 0f 85 f6 00 00 00 jne 1055e0 written += chunk; 1054ea: 8b 7d d8 mov -0x28(%ebp),%edi 1054ed: 01 7d dc add %edi,-0x24(%ebp) 1054f0: 8b 45 dc mov -0x24(%ebp),%eax while (written < count) { 1054f3: 3b 45 10 cmp 0x10(%ebp),%eax 1054f6: 89 45 d4 mov %eax,-0x2c(%ebp) 1054f9: 0f 83 83 01 00 00 jae 105682 <== ALWAYS TAKEN while (PIPE_SPACE(pipe) < chunk) { 1054ff: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED chunk = 1; 105502: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED 105507: e9 57 ff ff ff jmp 105463 <== NOT EXECUTED 10550c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED chunk = count <= pipe->Size ? count : 1; 105510: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 105515: e9 fd fe ff ff jmp 105417 <== NOT EXECUTED 10551a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi <== NOT EXECUTED _Mutex_Release( mutex ); 105520: 8b 45 e4 mov -0x1c(%ebp),%eax 105523: 89 04 24 mov %eax,(%esp) 105526: e8 a5 1a 00 00 call 106fd0 <_Mutex_Release> kill(getpid(), SIGPIPE); 10552b: e8 20 56 00 00 call 10ab50 105530: ba 0d 00 00 00 mov $0xd,%edx 105535: 89 54 24 04 mov %edx,0x4(%esp) 105539: 89 04 24 mov %eax,(%esp) 10553c: e8 1f 4b 00 00 call 10a060 105541: b8 e0 ff ff ff mov $0xffffffe0,%eax 105546: 89 45 dc mov %eax,-0x24(%ebp) } 105549: 8b 45 dc mov -0x24(%ebp),%eax 10554c: 83 c4 3c add $0x3c,%esp 10554f: 5b pop %ebx 105550: 5e pop %esi 105551: 5f pop %edi 105552: 5d pop %ebp 105553: c3 ret 105554: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 10555b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 10555f: 90 nop 105560: 8b 45 e4 mov -0x1c(%ebp),%eax 105563: 89 04 24 mov %eax,(%esp) 105566: e8 65 1a 00 00 call 106fd0 <_Mutex_Release> ret = -EAGAIN; 10556b: b8 f5 ff ff ff mov $0xfffffff5,%eax if (written > 0) 105570: 8b 55 dc mov -0x24(%ebp),%edx 105573: 85 d2 test %edx,%edx 105575: 7e cf jle 105546 } 105577: 8b 45 dc mov -0x24(%ebp),%eax 10557a: 83 c4 3c add $0x3c,%esp 10557d: 5b pop %ebx 10557e: 5e pop %esi 10557f: 5f pop %edi 105580: 5d pop %ebp 105581: c3 ret 105582: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 105589: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 105590: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED kill(getpid(), SIGPIPE); 105593: bf 0d 00 00 00 mov $0xd,%edi <== NOT EXECUTED 105598: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED 10559b: e8 30 1a 00 00 call 106fd0 <_Mutex_Release> <== NOT EXECUTED 1055a0: e8 ab 55 00 00 call 10ab50 <== NOT EXECUTED 1055a5: 89 7c 24 04 mov %edi,0x4(%esp) <== NOT EXECUTED 1055a9: 89 04 24 mov %eax,(%esp) <== NOT EXECUTED 1055ac: e8 af 4a 00 00 call 10a060 <== NOT EXECUTED 1055b1: b8 e0 ff ff ff mov $0xffffffe0,%eax <== NOT EXECUTED 1055b6: eb b8 jmp 105570 <== NOT EXECUTED 1055b8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi <== NOT EXECUTED 1055bf: 90 nop <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 1055c0: 8b 45 d8 mov -0x28(%ebp),%eax 1055c3: 89 d7 mov %edx,%edi 1055c5: 89 ce mov %ecx,%esi 1055c7: 83 f8 08 cmp $0x8,%eax 1055ca: 73 24 jae 1055f0 <== ALWAYS TAKEN 1055cc: 89 c1 mov %eax,%ecx 1055ce: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 1055d0: e9 04 ff ff ff jmp 1054d9 1055d5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 1055dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi PIPE_WAKEUPREADERS(pipe); 1055e0: 8d 43 3c lea 0x3c(%ebx),%eax 1055e3: 89 04 24 mov %eax,(%esp) _Condition_Broadcast( condition_variable ); 1055e6: e8 85 05 00 00 call 105b70 <_Condition_Broadcast> } 1055eb: e9 fa fe ff ff jmp 1054ea memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 1055f0: f6 c2 01 test $0x1,%dl 1055f3: 0f 85 d2 00 00 00 jne 1056cb <== NEVER TAKEN 1055f9: f7 c7 02 00 00 00 test $0x2,%edi 1055ff: 90 nop 105600: 0f 85 b0 00 00 00 jne 1056b6 <== NEVER TAKEN 105606: f7 c7 04 00 00 00 test $0x4,%edi 10560c: 74 be je 1055cc 10560e: 8b 16 mov (%esi),%edx 105610: 83 c7 04 add $0x4,%edi 105613: 83 c6 04 add $0x4,%esi 105616: 83 e8 04 sub $0x4,%eax 105619: 89 57 fc mov %edx,-0x4(%edi) 10561c: eb ae jmp 1055cc memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 10561e: f7 c6 01 00 00 00 test $0x1,%esi 105624: 0f 85 c6 00 00 00 jne 1056f0 <== NEVER TAKEN 10562a: f7 c7 02 00 00 00 test $0x2,%edi 105630: 0f 85 a5 00 00 00 jne 1056db <== NEVER TAKEN 105636: f7 c7 04 00 00 00 test $0x4,%edi 10563c: 0f 84 93 fe ff ff je 1054d5 <== NEVER TAKEN 105642: 8b 10 mov (%eax),%edx 105644: 83 c7 04 add $0x4,%edi 105647: 83 c0 04 add $0x4,%eax 10564a: 83 e9 04 sub $0x4,%ecx 10564d: 89 57 fc mov %edx,-0x4(%edi) 105650: e9 80 fe ff ff jmp 1054d5 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 105655: f6 c2 01 test $0x1,%dl 105658: 75 4d jne 1056a7 <== NEVER TAKEN 10565a: f7 c7 02 00 00 00 test $0x2,%edi 105660: 75 32 jne 105694 <== ALWAYS TAKEN 105662: f7 c7 04 00 00 00 test $0x4,%edi 105668: 0f 84 44 fe ff ff je 1054b2 <== NEVER TAKEN 10566e: 8b 16 mov (%esi),%edx 105670: 83 c7 04 add $0x4,%edi 105673: 83 c6 04 add $0x4,%esi 105676: 89 57 fc mov %edx,-0x4(%edi) 105679: 83 6d d0 04 subl $0x4,-0x30(%ebp) 10567d: e9 30 fe ff ff jmp 1054b2 _Mutex_Release( mutex ); 105682: 8b 45 e4 mov -0x1c(%ebp),%eax 105685: 89 04 24 mov %eax,(%esp) 105688: e8 43 19 00 00 call 106fd0 <_Mutex_Release> 10568d: 31 c0 xor %eax,%eax 10568f: e9 dc fe ff ff jmp 105570 105694: 0f b7 16 movzwl (%esi),%edx 105697: 83 c7 02 add $0x2,%edi 10569a: 83 c6 02 add $0x2,%esi 10569d: 66 89 57 fe mov %dx,-0x2(%edi) 1056a1: 83 6d d0 02 subl $0x2,-0x30(%ebp) 1056a5: eb bb jmp 105662 1056a7: 0f b6 09 movzbl (%ecx),%ecx <== NOT EXECUTED 1056aa: 47 inc %edi <== NOT EXECUTED 1056ab: 46 inc %esi <== NOT EXECUTED 1056ac: 88 0a mov %cl,(%edx) <== NOT EXECUTED 1056ae: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED 1056b1: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 1056b4: eb a4 jmp 10565a <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 1056b6: 0f b7 16 movzwl (%esi),%edx <== NOT EXECUTED 1056b9: 83 c7 02 add $0x2,%edi <== NOT EXECUTED 1056bc: 83 c6 02 add $0x2,%esi <== NOT EXECUTED 1056bf: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 1056c2: 66 89 57 fe mov %dx,-0x2(%edi) <== NOT EXECUTED 1056c6: e9 3b ff ff ff jmp 105606 <== NOT EXECUTED 1056cb: 0f b6 01 movzbl (%ecx),%eax <== NOT EXECUTED 1056ce: 47 inc %edi <== NOT EXECUTED 1056cf: 46 inc %esi <== NOT EXECUTED 1056d0: 88 02 mov %al,(%edx) <== NOT EXECUTED 1056d2: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 1056d5: 48 dec %eax <== NOT EXECUTED 1056d6: e9 1e ff ff ff jmp 1055f9 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 1056db: 0f b7 10 movzwl (%eax),%edx <== NOT EXECUTED 1056de: 83 c7 02 add $0x2,%edi <== NOT EXECUTED 1056e1: 83 c0 02 add $0x2,%eax <== NOT EXECUTED 1056e4: 83 e9 02 sub $0x2,%ecx <== NOT EXECUTED 1056e7: 66 89 57 fe mov %dx,-0x2(%edi) <== NOT EXECUTED 1056eb: e9 46 ff ff ff jmp 105636 <== NOT EXECUTED 1056f0: 0f b6 12 movzbl (%edx),%edx <== NOT EXECUTED 1056f3: 47 inc %edi <== NOT EXECUTED 1056f4: 40 inc %eax <== NOT EXECUTED 1056f5: 49 dec %ecx <== NOT EXECUTED 1056f6: 88 16 mov %dl,(%esi) <== NOT EXECUTED 1056f8: e9 2d ff ff ff jmp 10562a <== NOT EXECUTED 1056fd: 90 nop 1056fe: 90 nop 1056ff: 90 nop