Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Ne.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org)
3// Licensed under the Apache License, Version 2.0 (see LICENSE file)
4// Official repository: https://github.com/ne-app-eu/src
5
6#ifndef __NEAPP_OS_H__
7#define __NEAPP_OS_H__
8
9#include <SystemKit/Macros.h>
10
12
13#ifndef N_OK
14#define N_OK (100)
15#endif
16
17#ifndef N_FAILED
18#define N_FAILED (330)
19#endif
20
21#ifndef N_ERROR
22#define N_ERROR (N_FAILED)
23#endif
24
25#ifndef N_HAS_FAILED
26#define N_HAS_FAILED(X) ((X) != N_OK)
27#endif
28
30#ifndef _BDLL
31#define _BDLL _COMMONCORE
32#endif
33
35#ifndef _NDLL
36#define _NDLL _BDLL
37#endif
38
39// --------------------- ARCH ---------------------
40// | OS.h |
41// | /System/ | OR | /Ant/
42// --------------------- ARCH ---------------------
43
44IMPORT_C SInt32 system(const Char*);
45IMPORT_C SInt32 execute(const Char*, const SInt32, Char**);
46IMPORT_C SInt32 shell(const Char*, const SInt32, Char**);
47
48IMPORT_C SInt32 atexit(Void (*function) (Void));
49IMPORT_C UInt32 sleep(UInt32 seconds);
50
51#ifndef at_fini
52#define at_fini atexit
53#endif
54
55IMPORT_C SInt64 start_task_fiber(Void (*function) (), ...);
56IMPORT_C SInt32 end_task_fiber(SInt64);
57
58IMPORT_C SInt64 start_exe_host(const Char*, const SInt32, Char**);
59IMPORT_C SInt32 end_exe_host(const SInt64);
60
61IMPORT_C SInt64 run_host_dll(const Char*, const SInt32, Char**);
62IMPORT_C SInt32 end_host_dll(SInt64);
63
64#endif
IMPORT_C UInt32 sleep(UInt32 seconds)
IMPORT_C SInt32 atexit(Void(*function)(Void))
IMPORT_C SInt32 end_host_dll(SInt64)
IMPORT_C SInt32 system(const Char *)
IMPORT_C SInt64 start_task_fiber(Void(*function)(),...)
IMPORT_C SInt64 run_host_dll(const Char *, const SInt32, Char **)
IMPORT_C SInt32 execute(const Char *, const SInt32, Char **)
IMPORT_C SInt32 shell(const Char *, const SInt32, Char **)
IMPORT_C SInt64 start_exe_host(const Char *, const SInt32, Char **)
IMPORT_C SInt32 end_task_fiber(SInt64)
IMPORT_C SInt32 end_exe_host(const SInt64)