mirror of
https://github.com/upa/mscp.git
synced 2026-02-17 11:44:48 +08:00
mscp: maintain mscp_thread structs in list
Instead of m->threads array, struct mscp_thread instanes are maintained in m->thread_list. This enables stable counter access via mscp_get_stats().
This commit is contained in:
@@ -380,11 +380,11 @@ int main(int argc, char **argv)
|
||||
|
||||
ret = mscp_start(m);
|
||||
if (ret < 0)
|
||||
fprintf(stderr, "%s\n", mscp_get_error());
|
||||
fprintf(stderr, "mscp_start: %s\n", mscp_get_error());
|
||||
|
||||
ret = mscp_join(m);
|
||||
if (ret != 0)
|
||||
fprintf(stderr, "%s\n", mscp_get_error());
|
||||
fprintf(stderr, "mscp_join: %s\n", mscp_get_error());
|
||||
|
||||
pthread_cancel(tid_stat);
|
||||
pthread_join(tid_stat, NULL);
|
||||
|
||||
Reference in New Issue
Block a user