Changeset 36e9cd1 in mainline for uspace/lib


Ignore:
Timestamp:
2010-02-10T23:15:27Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0701066
Parents:
3149fc0
Message:

silence compiler warnings (no change in actual functionality)

Location:
uspace/lib/libc
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/arch/ia64/include/ddi.h

    r3149fc0 r36e9cd1  
    3939#include <libarch/types.h>
    4040
    41 #define IO_SPACE_BOUNDARY       (64 * 1024)
     41#define IO_SPACE_BOUNDARY       ((void *) (64 * 1024))
    4242
    4343uint64_t get_ia64_iospace_address(void);
  • uspace/lib/libc/arch/sparc64/include/ddi.h

    r3149fc0 r36e9cd1  
    3737#include <libarch/types.h>
    3838
    39 static inline memory_barrier(void)
     39static inline void memory_barrier(void)
    4040{
    41         asm volatile ("membar #LoadLoad | #StoreStore\n" ::: "memory");
     41        asm volatile (
     42                "membar #LoadLoad | #StoreStore\n"
     43                ::: "memory"
     44        );
    4245}
    4346
  • uspace/lib/libc/arch/sparc64/include/fibril.h

    r3149fc0 r36e9cd1  
    4848                    STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA); \
    4949                (c)->fp = -STACK_BIAS; \
    50                 (c)->tp = ptls; \
     50                (c)->tp = (uint64_t) ptls; \
    5151        } while (0)
    5252       
  • uspace/lib/libc/generic/clipboard.c

    r3149fc0 r36e9cd1  
    148148                        aid_t req = async_send_1(clip_phone, CLIPBOARD_GET_DATA, tag, NULL);
    149149                        rc = async_data_read_start(clip_phone, (void *) sbuf, size);
    150                         if (rc == EOVERFLOW) {
     150                        if ((int) rc == EOVERFLOW) {
    151151                                /*
    152152                                 * The data in the clipboard has changed since
  • uspace/lib/libc/generic/fibril.c

    r3149fc0 r36e9cd1  
    4141#include <unistd.h>
    4242#include <stdio.h>
     43#include <arch/barrier.h>
    4344#include <libarch/faddr.h>
    4445#include <futex.h>
     
    133134int fibril_switch(fibril_switch_type_t stype)
    134135{
    135         fibril_t *srcf, *dstf;
    136136        int retval = 0;
    137137       
    138138        futex_down(&fibril_futex);
    139 
     139       
    140140        if (stype == FIBRIL_PREEMPT && list_empty(&ready_list))
    141141                goto ret_0;
    142 
     142       
    143143        if (stype == FIBRIL_FROM_MANAGER) {
    144                 if (list_empty(&ready_list) && list_empty(&serialized_list))
     144                if ((list_empty(&ready_list)) && (list_empty(&serialized_list)))
    145145                        goto ret_0;
     146               
    146147                /*
    147148                 * Do not preempt if there is not enough threads to run the
    148149                 * ready fibrils which are not serialized.
    149150                 */
    150                 if (list_empty(&serialized_list) &&
    151                     threads_in_manager <= serialized_threads) {
     151                if ((list_empty(&serialized_list)) &&
     152                    (threads_in_manager <= serialized_threads)) {
    152153                        goto ret_0;
    153154                }
    154155        }
     156       
    155157        /* If we are going to manager and none exists, create it */
    156         if (stype == FIBRIL_TO_MANAGER || stype == FIBRIL_FROM_DEAD) {
     158        if ((stype == FIBRIL_TO_MANAGER) || (stype == FIBRIL_FROM_DEAD)) {
    157159                while (list_empty(&manager_list)) {
    158160                        futex_up(&fibril_futex);
     
    162164        }
    163165       
    164         srcf = __tcb_get()->fibril_data;
     166        fibril_t *srcf = __tcb_get()->fibril_data;
    165167        if (stype != FIBRIL_FROM_DEAD) {
     168               
    166169                /* Save current state */
    167170                if (!context_save(&srcf->ctx)) {
    168171                        if (serialization_count)
    169172                                srcf->flags &= ~FIBRIL_SERIALIZED;
     173                       
    170174                        if (srcf->clean_after_me) {
    171175                                /*
     
    173177                                 * restored context here.
    174178                                 */
    175                                 void *stack = srcf->clean_after_me->stack; 
     179                                void *stack = srcf->clean_after_me->stack;
    176180                                if (stack) {
    177181                                        /*
     
    188192                                srcf->clean_after_me = NULL;
    189193                        }
     194                       
    190195                        return 1;       /* futex_up already done here */
    191196                }
    192 
     197               
    193198                /* Save myself to the correct run list */
    194199                if (stype == FIBRIL_PREEMPT)
     
    197202                        list_append(&srcf->link, &manager_list);
    198203                        threads_in_manager--;
    199                 } else {       
     204                } else {
    200205                        /*
    201206                         * If stype == FIBRIL_TO_MANAGER, don't put ourselves to
     
    206211        }
    207212       
     213        /* Avoid srcf being clobbered by context_save() */
     214        srcf = __tcb_get()->fibril_data;
     215       
    208216        /* Choose a new fibril to run */
    209         if (stype == FIBRIL_TO_MANAGER || stype == FIBRIL_FROM_DEAD) {
     217        fibril_t *dstf;
     218        if ((stype == FIBRIL_TO_MANAGER) || (stype == FIBRIL_FROM_DEAD)) {
    210219                dstf = list_get_instance(manager_list.next, fibril_t, link);
    211220                if (serialization_count && stype == FIBRIL_TO_MANAGER) {
     
    214223                }
    215224                threads_in_manager++;
    216 
     225               
    217226                if (stype == FIBRIL_FROM_DEAD)
    218227                        dstf->clean_after_me = srcf;
     
    228237        }
    229238        list_remove(&dstf->link);
    230 
     239       
    231240        futex_up(&fibril_futex);
    232241        context_restore(&dstf->ctx);
    233242        /* not reached */
    234 
     243       
    235244ret_0:
    236245        futex_up(&fibril_futex);
  • uspace/lib/libc/generic/ipc.c

    r3149fc0 r36e9cd1  
    728728    int *flags)
    729729{
    730         int res;
    731         sysarg_t tmp_flags;
    732         res = ipc_call_sync_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst,
     730        sysarg_t tmp_flags = 0;
     731        int res = ipc_call_sync_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst,
    733732            (ipcarg_t) size, arg, NULL, &tmp_flags);
     733       
    734734        if (flags)
    735735                *flags = tmp_flags;
     736       
    736737        return res;
    737738}
  • uspace/lib/libc/include/macros.h

    r3149fc0 r36e9cd1  
    4848#define STRING_ARG(arg)  #arg
    4949
    50 #define LOWER32(arg)  ((arg) & 0xffffffff)
    51 #define UPPER32(arg)  (((arg) >> 32) & 0xffffffff)
     50#define LOWER32(arg)  (((uint64_t) (arg)) & 0xffffffff)
     51#define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & 0xffffffff)
    5252
    5353#define MERGE_LOUP32(lo, up) \
Note: See TracChangeset for help on using the changeset viewer.