STRUCT TS_OPS(9)
π 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:
struct ts_state(9)struct ts_config(9)textsearch_next(9)textsearch_find(9)textsearch_get_pattern(9)textsearch_get_pattern_len(9)
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
- 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