hal_set_lock(3hal)

πŸ’– hal_set_lock(3hal) πŸ’–

okay bestie, gather round, because we're talking about the HAL lock β€” this is hal_set_lock and hal_get_lock from the 3hal manual, and yes it's a short page but it's still giving main character energy πŸŽ€


✨ NAME ✨

hal_set_lock, hal_get_lock β€” set it or get it, that's the whole vibe: the HAL lock level πŸ’…


✨ SYNTAX ✨

int hal_set_lock(unsigned char lock_type)

int hal_get_lock()

that's it. two functions. short king behavior, we love to see it 🫢


✨ ARGUMENTS ✨

  • lock_type β€” the lock type you're craving, bestie. it can be a bitwise combination of: HAL_LOCK_LOAD, HAL_LOCK_CONFIG, HAL_LOCK_PARAMS, or HAL_LOCK_PARAMS.
not me reading that list twice πŸ’€ yes, the page really does say HAL_LOCK_PARAMS two times in a row. i'm just telling you what it says, i'm not the one who wrote it πŸ™ˆ
  • also: HAL_LOCK_NONE or 0 locks nothing β€” zero, zilch, no lock at all.
  • and HAL_LOCK_ALL locks everything πŸ”₯ the whole buffet. no crumbs left.

✨ DESCRIPTION ✨

okay so this section is literally empty on the page 😭 nothing in it. no lore, no tea, no explanation. it's giving mysterious. we move on πŸ’€


✨ RETURN VALUE ✨

  • hal_set_lock β€” returns a HAL status code. simple. clean. iconic ⭐
  • hal_get_lock β€” returns the current HAL lock level, or a HAL status code. so like, either the vibe you're currently in, or an error telling you the vibe check failed 😭
ngl, that's the whole page. don't overthink it bestie, it's not that deep 🌸

and that's the tea πŸ“ this page came from the LinuxCNC Documentation, dated 2006-10-12 β€” a lil vintage, a lil retro, still slaying πŸ‘‘ stay locked (or unlocked, your call), mwah πŸ’–πŸ¦‹