My Project
Loading...
Searching...
No Matches
factory
threadsupport.cc
Go to the documentation of this file.
1
#include <string.h>
2
#include <stdlib.h>
3
4
#ifdef __cplusplus
5
extern
"C"
{
6
#endif
7
8
#ifdef PSINGULAR
9
typedef
struct
InitList
{
10
struct
InitList
*
next
;
11
void
(*func)();
12
}
InitList
;
13
14
static
InitList
*
inits
;
15
16
void
pSingular_initialize_thread
() {
17
InitList
*list =
inits
;
18
while
(list) {
19
list->func();
20
list = list->next;
21
}
22
}
23
24
void
pSingular_register_init
(
void
(*
f
)()) {
25
InitList
*
next
= (
InitList
*)
malloc
(
sizeof
(
InitList
));
26
next
->next =
inits
;
27
next
->func =
f
;
28
inits
=
next
;
29
(*f)();
30
}
31
32
void
pSingular_init_var
(
void
*
s
,
void
*t,
long
n) {
33
memcpy
(
s
, t, n);
34
}
35
36
void
*
pSingular_alloc_var
(
long
n) {
37
return
malloc
(n);
38
}
39
40
#endif
41
#ifdef __cplusplus
42
}
43
#endif
f
FILE * f
Definition
checklibs.c:9
List
Definition
ftmpl_list.h:52
List::List
List()
Definition
ftmpl_list.cc:86
s
const CanonicalForm int s
Definition
facAbsFact.cc:51
next
ListNode * next
Definition
janet.h:31
malloc
#define malloc
Definition
omAllocFunc.c:12
pSingular_initialize_thread
void pSingular_initialize_thread()
Generated on Tue May 21 2024 21:52:47 for My Project by
doxygen 1.9.8
for
Singular