This is the second of two big changes to clean up includes throughout the project. Since I've started using clangd with Neovim and using VSCode's intellisense, my former strategy of copying all header files into place in `build/include` means that the real files don't show up in `compile_commands.json` and so display many include errors when viewing those header files in those tools. That setup was mostly predicated on a desire to keep directory depths small, but really I don't think paths like `src/libraries/j6/j6` are much better than `src/libraries/j6/include/j6`, and the latter doesn't have the aforementioned issues, and is clearer to the casual observer as well. Some additional changes: - Added a new module flag `copy_headers` for behavior similar to the old style, but placing headers in `$module_dir/include` instead of the global `build/include`. This was needed for external projects that don't follow the same source/headers folder structure - in this case, `zstd`. - There is no longer an associated `headers.*.ninja` for each `module.*.ninja` file, as only parsed headers need to be listed; this functionality has been moved back into the module's ninja file.
29 lines
439 B
C++
29 lines
439 B
C++
#pragma once
|
|
/// \file condition.hh
|
|
/// High level condition interface based on futexes
|
|
|
|
// The kernel depends on libj6 for some shared code,
|
|
// but should not include the user-specific code.
|
|
#ifndef __j6kernel
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
namespace j6 {
|
|
|
|
class condition
|
|
{
|
|
public:
|
|
condition() : m_state {0} {}
|
|
|
|
void wait();
|
|
void wake();
|
|
|
|
private:
|
|
uint32_t m_state;
|
|
};
|
|
|
|
} // namespace j6
|
|
|
|
#endif // __j6kernel
|