Turnstone Operating System
Loading...
Searching...
No Matches
future.h File Reference

Future header. More...

#include <types.h>
#include <memory.h>
#include <cpu/sync.h>

Macros

#define ___FUTURE_H   0
 
#define future_create(l)   future_create_with_heap_and_data(NULL, l, NULL)
 
#define future_create_with_data(l, d)   future_create_with_heap_and_data(NULL, l, d)
 

Typedefs

typedef struct future_t future_t
 

Functions

future_tfuture_create_with_heap_and_data (memory_heap_t *heap, lock_t *lock, void *data)
 dummy method for efi for creating a future. More...
 
void * future_get_data_and_destroy (future_t *future)
 

Detailed Description

Future header.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Function Documentation

◆ future_create_with_heap_and_data()

future_t * future_create_with_heap_and_data ( memory_heap_t heap,
lock_t lock,
void *  data 
)

dummy method for efi for creating a future.

this method is not required for efi however is required for linking. if data is not NULL then it is returned. otherwise 0xdeadbeaf is returned.

Parameters
heapheap to allocate future on. (ignored)
locklock to use for future. (ignored)
datadata to store in future.
Returns
data if data is not NULL. otherwise 0xdeadbeaf.