Subversion Repositories HelenOS

Rev

Rev 2939 | Rev 2941 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2939 Rev 2940
Line 36... Line 36...
36
#include <libadt/list.h>
36
#include <libadt/list.h>
37
#include <assert.h>
37
#include <assert.h>
38
#include <futex.h>
38
#include <futex.h>
39
#include <async.h>
39
#include <async.h>
40
 
40
 
-
 
41
#include "include/arch.h"
-
 
42
#include "main.h"
41
#include "dthread.h"
43
#include "dthread.h"
42
 
44
 
43
static int last_thread_id = 0;
45
static int last_thread_id = 0;
44
 
46
 
45
link_t dthreads;        /* List of application's threads */
47
link_t dthreads;        /* List of application's threads */
Line 123... Line 125...
123
    dt->stopped = 0;
125
    dt->stopped = 0;
124
 
126
 
125
    futex_up(&async_futex);
127
    futex_up(&async_futex);
126
}
128
}
127
 
129
 
-
 
130
unsigned dthread_get_pc(dthread_t *dt)
-
 
131
{
-
 
132
    static unsigned istate_buffer[1024];
-
 
133
    int rc;
-
 
134
 
-
 
135
    rc = udebug_regs_read(app_phone, dt->hash, istate_buffer);
-
 
136
    if (rc < 0) {
-
 
137
        printf("failed reading registers (%d)\n", rc);
-
 
138
        return 0;
-
 
139
    }
-
 
140
 
-
 
141
    return istate_get_pc(istate_buffer);
-
 
142
}
128
 
143
 
129
/** @}
144
/** @}
130
 */
145
 */