Deleted Added
full compact
28c28
< __FBSDID("$FreeBSD: head/lib/libthread_db/thread_db.c 163540 2006-10-20 14:15:42Z davidxu $");
---
> __FBSDID("$FreeBSD: head/lib/libthread_db/thread_db.c 177490 2008-03-22 05:40:44Z davidxu $");
33a34,35
> #include <sys/cdefs.h>
> #include <sys/linker_set.h>
44,45c46
< extern struct ta_ops libpthread_db_ops;
< extern struct ta_ops libthr_db_ops;
---
> SET_DECLARE(__ta_ops, struct ta_ops);
47,51d47
< static struct ta_ops *ops[] = {
< &libpthread_db_ops,
< &libthr_db_ops,
< };
<
55a52
> struct ta_ops *ops_p, **ops_pp;
59,61c56,59
< for (i = 0; i < sizeof(ops)/sizeof(ops[0]); i++) {
< if (ops[i]->to_init != NULL) {
< tmp = ops[i]->to_init();
---
> SET_FOREACH(ops_pp, __ta_ops) {
> ops_p = *ops_pp;
> if (ops_p->to_init != NULL) {
> tmp = ops_p->to_init();
109a108
> struct ta_ops *ops_p, **ops_pp;
111,112c110,112
< for (i = 0; i < sizeof(ops)/sizeof(ops[0]); ++i) {
< if (ops[i]->to_ta_new(ph, pta) == TD_OK) {
---
> SET_FOREACH(ops_pp, __ta_ops) {
> ops_p = *ops_pp;
> if (ops_p->to_ta_new(ph, pta) == TD_OK) {
114c114
< (*pta)->ta_ops = ops[i];
---
> (*pta)->ta_ops = ops_p;