Revision 52c4c4570fc0a9c028ab0e3cc316f09cba0737bc authored by Chris Foster on 10 January 2018, 12:02:07 UTC, committed by Chris Foster on 11 January 2018, 10:03:59 UTC
The metadata suffix is now printed on its own line by default, and disabled for `Info` level logging. The printing can be made more compact if desired by right justifying the metadata using the `right_justify` setting. Color is made customizable by requiring that it's returned from the meta_formatter() function.
1 parent ec8064c
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 "threadgroup.h"
#include "julia.h"
#define PROFILE_JL_THREADING 0
// thread ID
extern jl_ptls_t *jl_all_tls_states;
extern JL_DLLEXPORT int jl_n_threads; // # threads we're actually using
// thread state
enum {
TI_THREAD_INIT,
TI_THREAD_WORK
};
// passed to thread function
typedef struct {
int16_t volatile state;
int16_t tid;
ti_threadgroup_t *tg;
} ti_threadarg_t;
// commands to thread function
enum {
TI_THREADWORK_DONE,
TI_THREADWORK_RUN
};
// work command to thread function
typedef struct {
uint8_t command;
jl_method_instance_t *mfunc;
jl_generic_fptr_t fptr;
jl_value_t **args;
uint32_t nargs;
jl_value_t *ret;
jl_module_t *current_module;
size_t world_age;
} ti_threadwork_t;
// thread function
void ti_threadfun(void *arg);
// helpers for thread function
jl_value_t *ti_runthread(jl_function_t *f, jl_svec_t *args, size_t nargs);
#ifdef __cplusplus
}
#endif
#endif /* THREADING_H */
Computing file changes ...