The Pedigree Project 0.1
AtaWriteCache.h
1/*
2 * Copyright (c) 2026, Pedigree Developers
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted.
6 */
7
8#ifndef ATA_WRITE_CACHE_H
9#define ATA_WRITE_CACHE_H
10
11#include "pedigree/kernel/compiler.h"
12#include "pedigree/kernel/processor/types.h"
13#include "pedigree/kernel/utilities/Cache.h"
14
21MUST_USE_RESULT inline uintptr_t ataTakeQueuedWritePage(Cache& cache, uint64_t location) {
22 const uintptr_t buffer = cache.lookup(location);
23 cache.endMutableLoan(location);
24 cache.release(location);
25 return buffer;
26}
27
28#endif
Definition Cache.h:207