Changeset 26360f7 in mainline


Ignore:
Timestamp:
2009-06-12T19:44:25Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1806e5d
Parents:
9ae22ba
Message:

Use 'fibril_local' modifier for fibril-local variables instead of 'thread'. Since it is decalred in fibril.h, it need not begin with ''.

Location:
uspace
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/arch/arm32/include/tls.h

    r9ae22ba r26360f7  
    4141#define CONFIG_TLS_VARIANT_1
    4242
    43 /** Offsets for accessing __thread variables are shifted 8 bytes higher. */
     43/** Offsets for accessing thread-local variables are shifted 8 bytes higher. */
    4444#define ARM_TP_OFFSET  (-8)
    4545
  • uspace/lib/libc/generic/async.c

    r9ae22ba r26360f7  
    175175
    176176/** Identifier of the incoming connection handled by the current fibril. */
    177 __thread connection_t *FIBRIL_connection;
     177fibril_local connection_t *FIBRIL_connection;
    178178
    179179static void default_client_connection(ipc_callid_t callid, ipc_call_t *call);
  • uspace/lib/libc/generic/fibril.c

    r9ae22ba r26360f7  
    6565/** Number of threads that are executing a manager fibril and are serialized. */
    6666static int serialized_threads;  /* Protected by async_futex */
    67 /** Thread-local count of serialization. If > 0, we must not preempt */
    68 static __thread int serialization_count;
     67/** Fibril-local count of serialization. If > 0, we must not preempt */
     68static fibril_local int serialization_count;
    6969
    7070/** Setup fibril information into TCB structure */
  • uspace/lib/libc/include/fibril.h

    r9ae22ba r26360f7  
    7373typedef struct fibril fibril_t;
    7474
     75/** Fibril-local variable specifier */
     76#define fibril_local __thread
     77
    7578extern int context_save(context_t *c);
    7679extern void context_restore(context_t *c) __attribute__ ((noreturn));
  • uspace/srv/fb/fb.c

    r9ae22ba r26360f7  
    5555#include <io/style.h>
    5656#include <async.h>
     57#include <fibril.h>
    5758#include <bool.h>
    5859
     
    10391040 * @return false if the call was not handled byt this function, true otherwise
    10401041 *
    1041  * Note: this function is not threads safe, you would have
    1042  * to redefine static variables with __thread
     1042 * Note: this function is not thread-safe, you would have
     1043 * to redefine static variables with fibril_local.
    10431044 *
    10441045 */
  • uspace/srv/vfs/vfs_file.c

    r9ae22ba r26360f7  
    4141#include <assert.h>
    4242#include <bool.h>
     43#include <fibril.h>
    4344#include <fibril_sync.h>
    4445#include "vfs.h"
     
    5960 * don't need to protect it by a futex.
    6061 */
    61 __thread vfs_file_t **files = NULL;
     62fibril_local vfs_file_t **files = NULL;
    6263
    6364/** Initialize the table of open files. */
Note: See TracChangeset for help on using the changeset viewer.