Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-03-27 05:57:38 +0400
committerChristopher Faylor <me@cgf.cx>2005-03-27 05:57:38 +0400
commitec98d19a08c2e4678e8a6f40fea0c9bbeaa4a2c7 (patch)
tree667b5bf4984c1caa5b3f7df1b2b296e16c394c73 /winsup/cygwin/include/search.h
parent9eba97c0d5d723ce151b38d4bc78bd6fe097336c (diff)
* wininfo.h (wininfo::timer_active): Delete.
(wininfo::itv): Ditto. (wininfo::start_time): Ditto. (wininfo::window_started): Ditto. (wininfo::getitimer): Ditto. (wininfo::setitimer): Ditto. (wininfo::wininfo): Ditto. (wininfo::lock): New method. (wininfo::release): Ditto. * window.cc: Use new lock/acquire wininfo methods throughout. (wininfo::wininfo): Delete (wininfo::getitimer): Ditto. (wininfo::setitimer): Ditto. (getitimer): Ditto. (setitimer): Ditto. (ualarm): Ditto. (alarm): Ditto. (wininfo::lock): Define new function. (wininfo::release): Ditto. (wininfo::process): Delete WM_TIMER handling. * timer.cc (struct timetracker): Delete it, flags. Add it_interval, interval_us, sleepto_us, running, init_muto(), syncthread, and gettime(). (ttstart): Make NO_COPY. (lock_timer_tracker): New class. (timer_tracker::timer_tracker): Distinguish ttstart case. (timer_tracker::~timer_tracker): New destructor. Clean out events, and reset magic. (timer_tracker::init_muto): New method. (to_us): Round up as per POSIX. (timer_thread): Reorganize to match timer_tracker::settime and timer_tracker::gettime. Call sig_send without wait. Call auto_release. (timer_tracker::settime): Reorganize logic to avoid race. Call gettime to recover old value. (timer_tracker::gettime): New method. (timer_create): Properly set errno on invalid timerid. Use new lock_timer_tracker method. (timer_delete): Ditto. Simplify code slightly. (timer_gettime): New function. (fixup_timers_after_fork): Reinit ttstart. (getitimer): New implementation. (setitimer): Ditto. (ualarm): Ditto. (alarm): Ditto. * cygwin.din: Export timer_gettime. * winsup.h: Remove has has_visible_window_station declaration. * Makefile.in (DLL_OFILES): Add lsearch.o. * cygthread.h (cygthread::notify_detached): New element. (cygthread::cygthread): Take optional fourth argument signifying event to signal on thread completion. * cygthread.cc (cygthread::stub): Signal notify_detached event, if it exists. (cygthread::cygthread): Initialize notify_detached from fourth argument. (cygthread::detach): Wait for notify_detached field is present. * lsearch.cc: New file. * search.h: Ditto. * include/cygwin/version.h: Bump API minor number to 126. * cygwin.din: Export lsearch, lfind.
Diffstat (limited to 'winsup/cygwin/include/search.h')
-rw-r--r--winsup/cygwin/include/search.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/winsup/cygwin/include/search.h b/winsup/cygwin/include/search.h
new file mode 100644
index 000000000..fedfc8cf6
--- /dev/null
+++ b/winsup/cygwin/include/search.h
@@ -0,0 +1,64 @@
+/*-
+ * Written by J.T. Conklin <jtc@netbsd.org>
+ * Public domain.
+ *
+ * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $
+ * $FreeBSD: src/include/search.h,v 1.10 2002/10/16 14:29:23 robert Exp $
+ */
+
+#ifndef _SEARCH_H_
+#define _SEARCH_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+typedef struct entry
+{
+ char *key;
+ void *data;
+} ENTRY;
+
+typedef enum
+{
+ FIND, ENTER
+} ACTION;
+
+typedef enum
+{
+ preorder,
+ postorder,
+ endorder,
+ leaf
+} VISIT;
+
+#ifdef _SEARCH_PRIVATE
+typedef struct node
+{
+ char *key;
+ struct node *llink, *rlink;
+} node_t;
+
+struct que_elem
+{
+ struct que_elem *next;
+ struct que_elem *prev;
+};
+#endif
+
+__BEGIN_DECLS
+int hcreate (size_t);
+void hdestroy (void);
+ENTRY *hsearch (ENTRY, ACTION);
+void *lfind (const void *, const void *, size_t *, size_t,
+ int (*) (const void *, const void *));
+void *lsearch (const void *, void *, size_t *, size_t,
+ int (*) (const void *, const void *));
+void *tdelete (const void * __restrict, void ** __restrict,
+ int (*) (const void *, const void *));
+void *tfind (const void *, void * const *,
+ int (*) (const void *, const void *));
+void *tsearch (const void *, void **, int (*) (const void *, const void *));
+void twalk (const void *, void (*) (const void *, VISIT, int));
+__END_DECLS
+
+#endif /* !_SEARCH_H_ */