x86_64: user space TF handlers
[akaros.git] / user / pthread / pthread.c
index 722636b..508cf8f 100644 (file)
@@ -348,7 +348,7 @@ void pthread_lib_init(void)
        t->joiner = 0;
        assert(t->id == 0);
        /* Put the new pthread (thread0) on the active queue */
-       mcs_pdr_lock(&queue_lock);      /* arguably, we don't need these (_S mode) */
+       mcs_pdr_lock(&queue_lock);
        threads_active++;
        TAILQ_INSERT_TAIL(&active_queue, t, next);
        mcs_pdr_unlock(&queue_lock);
@@ -438,8 +438,8 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
        /* Set the u_tf to start up in __pthread_run, which will call the real
         * start_routine and pass it the arg.  Note those aren't set until later in
         * pthread_create(). */
-       init_user_ctx(&pthread->uthread.u_ctx, (long)&__pthread_run,
-                     (long)(pthread->stacktop));
+       init_user_ctx(&pthread->uthread.u_ctx, (uintptr_t)&__pthread_run,
+                     (uintptr_t)(pthread->stacktop));
        pthread->start_routine = start_routine;
        pthread->arg = arg;
        /* Initialize the uthread */