thread_message.icl 1.94 KB
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1
2
implementation module thread_message;

3
import StdString;
Diederik van Arkel's avatar
Diederik van Arkel committed
4

5
import code from "c_thread_message.";
Diederik van Arkel's avatar
Diederik van Arkel committed
6
7
8
9
10
11
12
import code from library "thread_kernel32_library";
import code from library "thread_user32_library";


get_message_number :: Int;
get_message_number  = code {
	ccall get_message_number ":I"
13
};
Diederik van Arkel's avatar
Diederik van Arkel committed
14
15
16
17
18
// int get_message_number ();

get_current_thread_id :: Int;
get_current_thread_id  = code {
	ccall get_current_thread_id ":I"
19
};
Diederik van Arkel's avatar
Diederik van Arkel committed
20
21
22
23
// int get_current_thread_id ();

start_compiler_process :: !String !String !String -> (!Int,!Int,!Int,!Int);
start_compiler_process a0 a1 a2 = code {
24
	ccall start_compiler_process "SSS:IIpp"
25
};
26
// int start_compiler_process (CleanString compiler_path,CleanString compiler_directory,CleanString command,int* compiler_thread_id_p,size_t* compiler_thread_handle_p,size_t* process_handle_p);
Diederik van Arkel's avatar
Diederik van Arkel committed
27
28
29
30

send_string_to_thread :: !Int !Int !Int !String -> Int;
send_string_to_thread a0 a1 a2 a3 = code {
	ccall send_string_to_thread "IIIS:I"
31
};
Diederik van Arkel's avatar
Diederik van Arkel committed
32
33
34
35
36
// int send_string_to_thread (int thread_id,int thread_handle,int wm_number,CleanString s);

send_integers_to_thread :: !Int !Int !Int !Int -> Int;
send_integers_to_thread a0 a1 a2 a3 = code {
	ccall send_integers_to_thread "IIII:I"
37
};
Diederik van Arkel's avatar
Diederik van Arkel committed
38
39
40
41
42
// int send_integers_to_thread (int thread_id,int wm_number,int i1,int i2);

get_integers_from_message :: !Int -> (!Int,!Int,!Int);
get_integers_from_message a0 = code {
	ccall get_integers_from_message "I:III"
43
};
Diederik van Arkel's avatar
Diederik van Arkel committed
44
45
46
47
48
// int get_integers_from_message (int wm_number,int* i1_p,int* i2_p);

get_integers_from_thread_message :: !Int !Int -> (!Int,!Int,!Int);
get_integers_from_thread_message a0 a1 = code {
	ccall get_integers_from_thread_message "II:III"
49
};
Diederik van Arkel's avatar
Diederik van Arkel committed
50
51
52
53
54
// int get_integers_from_thread_message (int wm_number,int thread_handle,int* i1_p,int* i2_p);

get_string_from_file_map_and_delete_map :: !Int !String -> Int;
get_string_from_file_map_and_delete_map a0 a1 = code {
	ccall get_string_from_file_map_and_delete_map "IS:I"
55
};
Diederik van Arkel's avatar
Diederik van Arkel committed
56
// int get_string_from_file_map_and_delete_map (int file_map,CleanString s);