Changeset 6610565b in mainline for uspace/lib/c/generic/io/vprintf.c


Ignore:
Timestamp:
2011-01-10T16:20:56Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1ffa73b, 8048c648, 8426912a, 977fcea, f401312
Parents:
a97ea0f (diff), 4a5c6c1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/vprintf.c

    ra97ea0f r6610565b  
    3737#include <unistd.h>
    3838#include <io/printf_core.h>
    39 #include <futex.h>
     39#include <fibril_synch.h>
    4040#include <async.h>
    4141#include <str.h>
    4242
    43 static atomic_t printf_futex = FUTEX_INITIALIZER;
     43static FIBRIL_MUTEX_INITIALIZE(printf_mutex);
    4444
    4545static int vprintf_str_write(const char *str, size_t size, void *stream)
     
    8585         * Prevent other threads to execute printf_core()
    8686         */
    87         futex_down(&printf_futex);
    88        
    89         /*
    90          * Prevent other fibrils of the same thread
    91          * to execute printf_core()
    92          */
    93         async_serialize_start();
     87        fibril_mutex_lock(&printf_mutex);
    9488       
    9589        int ret = printf_core(fmt, &ps, ap);
    9690       
    97         async_serialize_end();
    98         futex_up(&printf_futex);
     91        fibril_mutex_unlock(&printf_mutex);
    9992       
    10093        return ret;
Note: See TracChangeset for help on using the changeset viewer.