up
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
a.out
|
||||
a.exe
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
echo -n "File: "
|
||||
read file
|
||||
|
||||
while true
|
||||
do
|
||||
clear && gcc $file && ./a.out
|
||||
echo "----------------"
|
||||
echo "Programm ended."
|
||||
echo "----------------"
|
||||
read _
|
||||
done
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
echo -n "File: "
|
||||
read file
|
||||
|
||||
while true
|
||||
do
|
||||
clear && x86_64-w64-mingw32-gcc $file && wine a.exe
|
||||
echo "----------------"
|
||||
echo "Programm ended."
|
||||
echo "----------------"
|
||||
read _
|
||||
done
|
||||
@@ -0,0 +1,26 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../libs/threads.h"
|
||||
|
||||
void* task() {
|
||||
while (1) {
|
||||
printf("Background task running\n");
|
||||
wait(1);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main() {
|
||||
void* thread_handle;
|
||||
start_thread(&thread_handle, task);
|
||||
|
||||
printf("Main program continues\n");
|
||||
wait(5);
|
||||
|
||||
kill_thread(thread_handle);
|
||||
|
||||
printf("Background task killed\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "../libs/time.h"
|
||||
|
||||
int main() {
|
||||
printf("Wait 5 seconds...\n");
|
||||
wait(5);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user