ENUM MEDIA_REQUEST_STATE(9)
π enum media_request_state(9) π
okay so bestie, welcome to the Kernel API Manual β¨ today's main character is enum media_request_state β literally the whole vibe-check system for media requests. it's giving "state machine but make it cute" π¦
πΈ SYNOPSIS πΈ
here's the whole squad, in order, exactly as they live in the header:
enum media_request_state {
MEDIA_REQUEST_STATE_IDLE ,
MEDIA_REQUEST_STATE_VALIDATING ,
MEDIA_REQUEST_STATE_QUEUED ,
MEDIA_REQUEST_STATE_COMPLETE ,
MEDIA_REQUEST_STATE_CLEANING ,
MEDIA_REQUEST_STATE_UPDATING ,
NR_OF_MEDIA_REQUEST_STATE
};
π CONSTANTS π
these are the states, and yes, every single one of them matters π
MEDIA_REQUEST_STATE_IDLEβ the request is just... idle. chilling. doing nothing, living its best life πMEDIA_REQUEST_STATE_VALIDATINGβ it's validating the request rn, and ngl: no state changes allowed while this is happening. periodt. π«MEDIA_REQUEST_STATE_QUEUEDβ queued, babes. it's in line, waiting its turn π«ΆMEDIA_REQUEST_STATE_COMPLETEβ completed! the request is done, it ate and left no crumbs β¨MEDIA_REQUEST_STATE_CLEANINGβ cleaning era π§Ή the request is being re-inited, gotta reset before the next roundMEDIA_REQUEST_STATE_UPDATINGβ the request is being updated, i.e. request objects are being added, modified or removed. lowkey the busiest state fr fr π₯NR_OF_MEDIA_REQUEST_STATEβ the number of media request states. it's used internally for sanity check purposes, so it's not really a state, it's the count π a little icon, a little legend
real talk: that VALIDATING one is the one to remember β no state changes allowed there. not a drill π
π SEE ALSO π
if you're obsessed (and you should be), go read these next. full list, no skips:
Kernel file ./include/media/media-request.h, plus struct media_request(9), media_request_lock_for_access(9), media_request_unlock_for_access(9), media_request_lock_for_update(9), media_request_unlock_for_update(9), media_request_get(9), media_request_put(9), media_request_get_by_fd(9), media_request_alloc(9), media_request_mark_manual_completion(9), media_request_manual_complete(9), struct media_request_object_ops(9), struct media_request_object(9), media_request_object_get(9), media_request_object_put(9), media_request_object_find(9), media_request_object_init(9), media_request_object_bind(9), media_request_object_unbind(9), media_request_object_complete(9) π
that's the whole page, bestie π this one came from ./include/media, dated October 2026, and it's filed under the Kernel API Manual β go forth and state-machine responsibly π§π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms