Changeset 0dc2fec in mainline for uspace/lib/c


Ignore:
Timestamp:
2016-05-22T19:19:43Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b272c67a
Parents:
153c7a29 (diff), af2254ec (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

Location:
uspace/lib/c
Files:
5 edited
2 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/Makefile

    r153c7a29 r0dc2fec  
    4646SLIBRARY = libc.so.0.0
    4747LSONAME = libc.so.0
    48 
    49 LIBS = $(LIBURCU_PREFIX)/liburcu.a
    50 EXTRA_CFLAGS += -I$(LIBURCU_PREFIX)
    5148
    5249-include $(CONFIG_MAKEFILE)
     
    150147        generic/vfs/vfs.c \
    151148        generic/vfs/canonify.c \
     149        generic/rcu.c \
    152150        generic/setjmp.c \
    153151        generic/stack.c \
  • uspace/lib/c/generic/double_to_str.c

    r153c7a29 r0dc2fec  
    505505{
    506506        /* The whole computation assumes 64bit significand. */
    507         assert(sizeof(ieee_val.pos_val.significand) == sizeof(uint64_t));
     507        static_assert(sizeof(ieee_val.pos_val.significand) == sizeof(uint64_t));
    508508
    509509        if (ieee_val.is_special) {
     
    753753{
    754754        /* The whole computation assumes 64bit significand. */
    755         assert(sizeof(ieee_val.pos_val.significand) == sizeof(uint64_t));
     755        static_assert(sizeof(ieee_val.pos_val.significand) == sizeof(uint64_t));
    756756
    757757        if (ieee_val.is_special) {
  • uspace/lib/c/generic/fibril.c

    r153c7a29 r0dc2fec  
    114114        fibril->waits_for = NULL;
    115115
    116         futex_lock(&fibril_futex);
     116        /*
     117         * We are called before __tcb_set(), so we need to use
     118         * futex_down/up() instead of futex_lock/unlock() that
     119         * may attempt to access TLS.
     120         */
     121        futex_down(&fibril_futex);
    117122        list_append(&fibril->all_link, &fibril_list);
    118         futex_unlock(&fibril_futex);
     123        futex_up(&fibril_futex);
    119124       
    120125        return fibril;
  • uspace/lib/c/generic/ieee_double.c

    r153c7a29 r0dc2fec  
    4545        const int exponent_bias = 1075;
    4646
    47         assert(sizeof(val) == sizeof(uint64_t));
     47        static_assert(sizeof(val) == sizeof(uint64_t));
    4848
    4949        union {
  • uspace/lib/c/include/assert.h

    r153c7a29 r0dc2fec  
    3737#define LIBC_ASSERT_H_
    3838
     39#define static_assert(expr)     _Static_assert(expr, "")
     40
    3941/** Debugging assert macro
    4042 *
Note: See TracChangeset for help on using the changeset viewer.