1 /* $NetBSD: thread.h,v 1.1 2006/11/28 18:45:32 christos Exp $ */
4 * Copyright (c) 2006 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
38 #define NDEBUG /* disable the asserts */
42 * The core message control routines. Without thread support, they
45 struct message
*next_message(struct message
*);
46 struct message
*prev_message(struct message
*);
47 struct message
*get_message(int);
48 int get_msgnum(struct message
*);
49 int get_msgCount(void);
51 /* These give special access to the message array needed in lex.c */
52 struct message
*get_abs_message(int);
53 struct message
*next_abs_message(struct message
*);
54 int get_abs_msgCount(void);
57 * Support hooks used by other modules.
59 void thread_fix_old_links(struct message
*, struct message
*, int);
60 void thread_fix_new_links(struct message
*, int, int);
61 int thread_hidden(void);
62 int thread_depth(void);
63 int do_recursion(void);
64 int thread_recursion(struct message
*, int (*)(struct message
*, void *), void *);
65 const char *thread_next_key_name(const void **);
71 int flattencmd(void *);
72 int reversecmd(void *v
);
74 int threadcmd(void *);
75 int unthreadcmd(void *);
77 /* thread navigation */
83 int exposecmd(void *);
87 int invtagscmd(void *);
88 int tagbelowcmd(void *);
93 int hidetagscmd(void *);
94 int showtagscmd(void *);
96 /* something special */
97 int deldupscmd(void *);
99 #define ENAME_RECURSIVE_CMDS "recursive-commands"
102 * Debugging stuff that should go away.
106 int thread_showcmd(void *);
107 #endif /* THREAD_DEBUG */
109 #endif /* __THREAD_H__ */
110 #endif /* THREAD_SUPPORT */