Skip to content

Commit

Permalink
Dont stop the world
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Cimon committed Jun 17, 2015
1 parent 7da3939 commit 78a2bca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/core/exception.d
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ extern (C)

void _d_assert(string file, uint line)
{
asm { int 3; }
onAssertError(file, line);
}

Expand Down
5 changes: 0 additions & 5 deletions src/core/thread.d
Original file line number Diff line number Diff line change
Expand Up @@ -2715,11 +2715,6 @@ alias void delegate(ScanType, void*, void*) nothrow ScanAllThreadsTypeFn; /// di
* This routine must be preceded by a call to thread_suspendAll.
*/
extern (C) void thread_scanAllType( scope ScanAllThreadsTypeFn scan ) nothrow
in
{
assert( suspendDepth > 0 );
}
body
{
callWithStackShell(sp => scanAllTypeImpl(scan, sp));
}
Expand Down
12 changes: 8 additions & 4 deletions src/gc/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ struct GC
*/
uint setAttr(void* p, uint mask) nothrow
{
if (!gcx)
return 0;
if (!p)
{
return 0;
Expand Down Expand Up @@ -395,7 +397,9 @@ struct GC
*
*/
uint clrAttr(void* p, uint mask) nothrow
{
{
if (!gcx)
return 0;
if (!p)
{
return 0;
Expand Down Expand Up @@ -463,7 +467,7 @@ struct GC
assert(size != 0);

//debug(PRINTF) printf("GC::malloc(size = %d, gcx = %p)\n", size, gcx);
assert(gcx);
if (!gcx){ asm { int 3; } }
//debug(PRINTF) printf("gcx.self = %x, pthread_self() = %x\n", gcx.self, pthread_self());

if (gcx.running) {
Expand Down Expand Up @@ -2395,7 +2399,7 @@ struct Gcx
}
running = true;

thread_suspendAll();
//thread_suspendAll();

prepare();

Expand All @@ -2409,7 +2413,7 @@ struct Gcx
markAll(nostack);

thread_processGCMarks(&isMarked);
thread_resumeAll();
// thread_resumeAll();

if (GC.config.profile)
{
Expand Down

0 comments on commit 78a2bca

Please sign in to comment.