swh:1:snp:a72e953ecd624a7df6e6196bbdd05851996c5e40
Raw File
Tip revision: b8e9a9ecc62ab49003bd4f1834771bdeb8cb1aa2 authored by Kristoffer Carlsson on 21 March 2020, 16:36:32 UTC
Set VERSION to 1.4.0 (#35168)
Tip revision: b8e9a9e
threading.h
// This file is a part of Julia. License is MIT: https://julialang.org/license

#ifndef THREADING_H
#define THREADING_H

#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif

#include "julia.h"

#define PROFILE_JL_THREADING            0

extern jl_ptls_t *jl_all_tls_states JL_GLOBALLY_ROOTED; /* thread local storage */
extern JL_DLLEXPORT int jl_n_threads;   /* # threads we're actually using */

typedef struct _jl_threadarg_t {
    int16_t tid;
    uv_barrier_t *barrier;
    void *arg;
} jl_threadarg_t;

// each thread must initialize its TLS
void jl_init_threadtls(int16_t tid);

// provided by a threading infrastructure
void jl_init_threadinginfra(void);
void jl_threadfun(void *arg);

#ifdef __cplusplus
}
#endif

#endif  /* THREADING_H */
back to top