skipSearch(3)

πŸ’– skipSearch(3) πŸ’–

okay so bestie, this page lives in util/skiplist.h, and it's the skipSearch(3) manual. it's giving "find my value in a skip list" energy, and we're gonna read it together. no cap. ✨


✨ NAME ✨

skipSearch β€” search a skip list.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <util/skiplist.h>

void *skipSearch(skipList list, UINT32 key, void **plock);

πŸŽ€ ARGUMENTS πŸŽ€

  • list β€” the list you're searching in. like, the whole vibe container. πŸ”
  • key β€” the key to look for. periodt. πŸ”‘
  • plock β€” place for value lock (or NULL). if you don't want the lock, just pass NULL, bestie. πŸ’…

🌸 DESCRIPTION 🌸

so skipSearch searches for <key> in <list>, and returns the value if found, or NULL if not. that's the whole main character move. 🫢

if <plock> is non-NULL, then the lock returned in <plock> will be associated with the returned value. and until this lock is passed to skipRelease(), the value will not be freed with the freeValue callback (see skipNewList()). so like, hold onto that lock, okay? 😭

MT-Level: Safe if <list> is thread-safe. ✨


πŸ‘‘ RETURN VALUE πŸ‘‘

  • plock β€” set to value lock. that's it, that's the section. πŸ’…

🌈 SEE ALSO 🌈


mwah πŸ’‹ this page was brought to you by ClearSilver on 12 July 2007, and it's the skipSearch(3) manual, periodt. πŸŽ€