Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: kernel.h
- Revision:
- 4:357a34c10ef2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/kernel.h Tue Oct 03 00:17:53 2017 +0000
@@ -0,0 +1,26 @@
+#ifndef KERNEL_H_
+#define KERNEL_H_
+
+// c�digos de retorno
+#define SUCCESS 0
+#define FAIL 1
+#define REPEAT 2
+#define POOL_SIZE 10
+
+ // declara��o de ponteiro de fun��o
+ typedef char(*ptrFunc)(void);
+
+ typedef struct {
+ ptrFunc function;
+ int period;
+ //must be volatile to avoid optmizations on kernel waiting
+ volatile int deadline;
+ } process;
+
+ // prot�tipos das fun��es do kernel
+ void kernelInit(void);
+ char kernelAddProc(process* func);
+ void kernelLoop(void);// declara��o de ponteiro de fun��o
+ void kernelTick(void);
+
+#endif