Ignore:
Timestamp:
2007-04-07T18:00:18Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2a98e58
Parents:
5b303ba
Message:

use futex instead of pthread serialization
synchronize only output to stdout
cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/libc/generic/io/printf_core.c

    r5b303ba r3dbe2d1f  
    4141#include <ctype.h>
    4242#include <string.h>
    43 /* For serialization */
    44 #include <async.h>
    4543
    4644#define __PRINTF_FLAG_PREFIX            0x00000001      /**< show prefixes 0x or 0*/
     
    9391        size_t count;
    9492       
    95         if (str == NULL) {
     93        if (str == NULL)
    9694                return printf_putnchars("(NULL)", 6, ps);
    97         }
    9895
    9996        for (count = 0; str[count] != 0; count++);
    10097
    101         if (ps->write((void *) str, count, ps->data) == count) {
     98        if (ps->write((void *) str, count, ps->data) == count)
    10299                return 0;
    103         }
    104100       
    105101        return EOF;
     
    448444        uint64_t flags;
    449445       
    450         /* Don't let other threads interfere */
    451         async_serialize_start();
    452 
    453446        counter = 0;
    454447       
     
    682675        }
    683676       
    684         async_serialize_end();
    685677        return counter;
    686678minus_out:
    687         async_serialize_end();
    688679        return -counter;
    689680}
Note: See TracChangeset for help on using the changeset viewer.