Changeset f33be44 in rtems for cpukit/libfs/src/pipe/fifo.c


Ignore:
Timestamp:
Jun 24, 2010, 7:58:00 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10
Children:
00bf6744
Parents:
2aba0566
Message:

2010-06-24 Bharath Suri <bharath.s.jois@…>

PR 1542/filesystem
PR 1585/filesystem

  • libfs/src/pipe/fifo.c: pipe_control_t was not deallocated if fifo_open() was attempted with (O_WRONLY|O_NONBLOCK). Mutex was locked too many times on this path and we needed an unlock.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/pipe/fifo.c

    r2aba0566 rf33be44  
    103103    goto err_buf;
    104104
     105  err = -ENOMEM;
    105106  if (rtems_barrier_create(
    106107        rtems_build_name ('P', 'I', 'r', c),
     
    302303
    303304    case LIBIO_FLAGS_WRITE:
     305      pipe->writerCounter ++;
     306
     307      if (pipe->Writers ++ == 0)
     308        PIPE_WAKEUPREADERS(pipe);
     309
    304310      if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
     311        PIPE_UNLOCK(pipe);
    305312        err = -ENXIO;
    306313        goto out_error;
    307314      }
    308 
    309       pipe->writerCounter ++;
    310       if (pipe->Writers ++ == 0)
    311         PIPE_WAKEUPREADERS(pipe);
    312315
    313316      if (pipe->Readers == 0) {
Note: See TracChangeset for help on using the changeset viewer.