ttm_bo_reserve(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is the ttm_bo_reserve(9) page from the Kernel API Manual, and the NAME section is literally just the name with no extra description β€” lowkey iconic minimalism, honestly.


✨ SYNOPSIS ✨

int ttm_bo_reserve (struct ttm_buffer_object *bo , bool interruptible ,
       bool no_wait , struct ww_acquire_ctx *ticket );

πŸŽ€ ARGUMENTS πŸŽ€

  • bo β€” a pointer to a struct ttm_buffer_object. yes bestie, that exact one.
  • interruptible β€” sleep interruptible if waiting. that’s the whole assignment.
  • no_wait β€” don’t sleep while trying to reserve; instead return -EBUSY.
  • ticket β€” the ticket used to acquire the ww_mutex.

πŸ¦‹ DESCRIPTION πŸ¦‹

Locks a buffer object for validation. or, plot twist, it prevents other processes from locking it for validation β€” while taking a number of measures to prevent deadlocks. so it’s giving responsible main character energy, not chaos gremlin energy.


🌸 RETURN 🌸

here’s the code tea β˜•:

  • -EDEADLK β€” the reservation may cause a deadlock. Release all buffer reservations, wait for bo to become unreserved and try again.
  • -ERESTARTSYS β€” a wait for the buffer to become unreserved was interrupted by a signal. Release all buffer reservations and return to user-space.
  • -EBUSY β€” the function needed to sleep, but no_wait was true.
  • -EALREADY β€” Bo already reserved using ticket. This error code will only be returned if use_ticket is set to true.

πŸ’… SEE ALSO πŸ’…

Kernel file ./include/drm/ttm/ttm_bo.h, plus the whole friend group:


mwah πŸ’‹ β€” source/version: ./include/drm/ttm; date: October 2026. byeee 🫢

πŸ“¦ where this page comes from