STRUCT TS_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct ts_ops β€” search module operations. Yep bestie, this is the struct ts_ops(9) page from the Kernel API Manual, and it's literally the struct that describes how a search module does its whole thing. πŸŽ€

✨ SYNOPSIS ✨

okay so here's the full struct, exactly as it is:

       struct ts_ops {
           const char              *name;
           struct ts_config *      (*init)(const void *, unsigned int, gfp_t,
       int);
           unsigned int            (*find)(struct ts_config *, struct ts_state
       *);
           void (*destroy)(struct ts_config *);
           void *                  (*get_pattern)(struct ts_config *);
           unsigned int            (*get_pattern_len)(struct ts_config *);
           struct module           *owner;
           struct list_head        list;
        };

🌸 Members 🌸

  • name β€” name of search algorithm πŸ’«
  • init β€” initialization function to prepare a search. It's the get-ready-for-me function.
  • find β€” find the next occurrence of the pattern. this one's the main character fr fr.
  • destroy β€” destroy algorithm specific parts of a search configuration. clean it up, no leftovers.
  • get_pattern β€” return head of pattern.
  • get_pattern_len β€” return length of pattern.
  • owner β€” module reference to algorithm.
  • list β€” list to search.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/textsearch.h β€” plus these iconic cross-references, iykyk:


That's the whole vibe check, bestie. Source/version: ./include/linux Β· Date: October 2026 Β· manual page: struct ts_ops(9). Bye, ily! πŸ«ΆπŸ’…

πŸ“¦ where this page comes from