Skip to content

Commit

Permalink
runtime/cgo: use fatalf on dragonfly, freebsd, netbsd and openbsd
Browse files Browse the repository at this point in the history
Use fatalf consistently on freebsd. Also use it on dragonfly, netbsd
and openbsd.

Change-Id: I8643c0b7bc13c3cb5173209d311d6d297913955b
Reviewed-on: https://go-review.googlesource.com/c/go/+/518615
Reviewed-by: Ian Lance Taylor <[email protected]>
Run-TryBot: Joel Sing <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
4a6f656c committed Aug 15, 2023
1 parent 33da4ce commit 5feb8b6
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 29 deletions.
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_dragonfly_amd64.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/runtime/cgo/gcc_fatalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build aix || (!android && linux) || freebsd
//go:build aix || (!android && linux) || dragonfly || freebsd || netbsd || openbsd

#include <stdarg.h>
#include <stdio.h>
Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_freebsd_386.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_freebsd_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_freebsd_arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_freebsd_riscv64.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_netbsd_386.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_netbsd_amd64.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_netbsd_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_netbsd_arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_openbsd_386.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_openbsd_amd64.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_openbsd_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_openbsd_arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/runtime/cgo/gcc_openbsd_mips64.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
pthread_sigmask(SIG_SETMASK, &oset, nil);

if (err != 0) {
fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
abort();
fatalf("pthread_create failed: %s", strerror(err));
}
}

Expand Down

0 comments on commit 5feb8b6

Please sign in to comment.