Skip to content

Commit ff2e9e8

Browse files
dkorpeldlang-bot
authored andcommitted
Mark _d_critical_ and _d_monitor_ functions nogc nothrow
1 parent d4b863c commit ff2e9e8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/rt/critical_.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ nothrow:
1818

1919
import rt.monitor_, core.atomic;
2020

21-
extern (C) void _d_critical_init()
21+
extern (C) void _d_critical_init() @nogc nothrow
2222
{
2323
initMutex(cast(Mutex*)&gcs.mtx);
2424
head = &gcs;
2525
}
2626

27-
extern (C) void _d_critical_term()
27+
extern (C) void _d_critical_term() @nogc nothrow
2828
{
2929
// This function is only ever called by the runtime shutdown code
3030
// and therefore is single threaded so the following cast is fine.

src/rt/dmain2.d

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ struct UnitTestResult
5959
bool summarize;
6060
}
6161

62-
extern (C) void _d_monitor_staticctor();
63-
extern (C) void _d_monitor_staticdtor();
64-
extern (C) void _d_critical_init();
65-
extern (C) void _d_critical_term();
62+
extern (C) void _d_monitor_staticctor() @nogc nothrow;
63+
extern (C) void _d_monitor_staticdtor() @nogc nothrow;
64+
extern (C) void _d_critical_init() @nogc nothrow;
65+
extern (C) void _d_critical_term() @nogc nothrow;
6666
extern (C) void gc_init();
6767
extern (C) void gc_term();
6868
extern (C) void thread_init() @nogc;

src/rt/monitor_.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ extern (C) void rt_detachDisposeEvent(Object h, DEvent e)
148148

149149
nothrow:
150150

151-
extern (C) void _d_monitor_staticctor()
151+
extern (C) void _d_monitor_staticctor() @nogc nothrow
152152
{
153153
version (Posix)
154154
{
@@ -158,7 +158,7 @@ extern (C) void _d_monitor_staticctor()
158158
initMutex(&gmtx);
159159
}
160160

161-
extern (C) void _d_monitor_staticdtor()
161+
extern (C) void _d_monitor_staticdtor() @nogc nothrow
162162
{
163163
destroyMutex(&gmtx);
164164
version (Posix)

0 commit comments

Comments
 (0)