aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/include/worker.h
blob: e2f1cd4ab966a3a8b78af173064c0086f1631711 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

#include <thread.h>
#include <mutex.h>

void start_workers(int num_worker_threads);		// default : one is enough

bool worker_push(entry_t fun, void* data);
bool worker_push_in(int usecs, entry_t fun, void* data);

void notify_time_pass(int usecs);		// time source : PIT IRQ0

uint64_t get_kernel_time();				// usecs since we started some worker threads, ie since kernel startup

/* vim: set ts=4 sw=4 tw=0 noet :*/