-/*
- * 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).
- */
-void marker_update_process(void)
-{
- struct user_marker *umark;
- struct hlist_node *pos;
- struct marker_entry *entry;
-
- mutex_lock(&markers_mutex);
- mutex_lock(¤t->group_leader->user_markers_mutex);
- if (strcmp(current->comm, "testprog") == 0)
- printk(KERN_DEBUG "do update pending for testprog\n");
- hlist_for_each_entry(umark, pos,
- ¤t->group_leader->user_markers, hlist) {
- printk(KERN_DEBUG "Updating marker %s in %s\n",
- umark->name, current->comm);
- entry = get_marker("userspace", umark->name);
- if (entry) {
- if (entry->format &&
- strcmp(entry->format, umark->format) != 0) {
- printk(KERN_WARNING
- " error, wrong format in process %s\n",
- current->comm);
- break;
- }
- if (put_user(!!entry->refcount, umark->state)) {
- printk(KERN_WARNING
- "Marker in %s caused a fault\n",
- current->comm);
- break;
- }
- } else {
- if (put_user(0, umark->state)) {
- printk(KERN_WARNING
- "Marker in %s caused a fault\n",
- current->comm);
- break;
- }
- }
- }
- clear_thread_flag(TIF_MARKER_PENDING);
- mutex_unlock(¤t->group_leader->user_markers_mutex);
- mutex_unlock(&markers_mutex);
-}
-