- iter->marker = NULL;
-}
-//ust// EXPORT_SYMBOL_GPL(marker_iter_reset);
-
-#ifdef CONFIG_MARKERS_USERSPACE
-/*
- * must be called with current->user_markers_mutex held
- */
-static void free_user_marker(char __user *state, struct hlist_head *head)
-{
- struct user_marker *umark;
- struct hlist_node *pos, *n;
-
- hlist_for_each_entry_safe(umark, pos, n, head, hlist) {
- if (umark->state == state) {
- hlist_del(&umark->hlist);
- free(umark);
- }
- }
-}
-
-/*
- * Update current process.
- * Note that we have to wait a whole scheduler period before we are sure that
- * every running userspace threads have their markers updated.
- * (synchronize_sched() can be used to insure this).
- */
-//ust// void marker_update_process(void)
-//ust// {
-//ust// struct user_marker *umark;
-//ust// struct hlist_node *pos;
-//ust// struct marker_entry *entry;
-//ust//
-//ust// pthread_mutex_lock(&markers_mutex);
-//ust// pthread_mutex_lock(¤t->group_leader->user_markers_mutex);
-//ust// if (strcmp(current->comm, "testprog") == 0)
-//ust// DBG("do update pending for testprog");
-//ust// hlist_for_each_entry(umark, pos,
-//ust// ¤t->group_leader->user_markers, hlist) {
-//ust// DBG("Updating marker %s in %s", umark->name, current->comm);
-//ust// entry = get_marker("userspace", umark->name);
-//ust// if (entry) {
-//ust// if (entry->format &&
-//ust// strcmp(entry->format, umark->format) != 0) {
-//ust// WARN("error, wrong format in process %s",
-//ust// current->comm);
-//ust// break;
-//ust// }
-//ust// if (put_user(!!entry->refcount, umark->state)) {
-//ust// WARN("Marker in %s caused a fault",
-//ust// current->comm);
-//ust// break;
-//ust// }
-//ust// } else {
-//ust// if (put_user(0, umark->state)) {
-//ust// WARN("Marker in %s caused a fault", current->comm);
-//ust// break;
-//ust// }
-//ust// }
-//ust// }
-//ust// clear_thread_flag(TIF_MARKER_PENDING);
-//ust// pthread_mutex_unlock(¤t->group_leader->user_markers_mutex);
-//ust// pthread_mutex_unlock(&markers_mutex);
-//ust// }
-
-/*
- * Called at process exit and upon do_execve().
- * We assume that when the leader exits, no more references can be done to the
- * leader structure by the other threads.
- */
-void exit_user_markers(struct task_struct *p)
-{
- struct user_marker *umark;
- struct hlist_node *pos, *n;
-
- if (thread_group_leader(p)) {
- pthread_mutex_lock(&markers_mutex);
- pthread_mutex_lock(&p->user_markers_mutex);
- hlist_for_each_entry_safe(umark, pos, n, &p->user_markers,
- hlist)
- free(umark);
- INIT_HLIST_HEAD(&p->user_markers);
- p->user_markers_sequence++;
- pthread_mutex_unlock(&p->user_markers_mutex);
- pthread_mutex_unlock(&markers_mutex);
- }
-}
-
-int is_marker_enabled(const char *channel, const char *name)
-{
- struct marker_entry *entry;
-
- pthread_mutex_lock(&markers_mutex);
- entry = get_marker(channel, name);
- pthread_mutex_unlock(&markers_mutex);
-
- return entry && !!entry->refcount;