summaryrefslogtreecommitdiff
path: root/storage/innobase/os/os0thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/os/os0thread.cc')
-rw-r--r--storage/innobase/os/os0thread.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/storage/innobase/os/os0thread.cc b/storage/innobase/os/os0thread.cc
index 205bef02079..1182166f522 100644
--- a/storage/innobase/os/os0thread.cc
+++ b/storage/innobase/os/os0thread.cc
@@ -12,7 +12,7 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
*****************************************************************************/
@@ -143,7 +143,13 @@ os_thread_create_func(
pthread_attr_t attr;
#ifndef UNIV_HPUX10
- pthread_attr_init(&attr);
+ ret = pthread_attr_init(&attr);
+ if (UNIV_UNLIKELY(ret)) {
+ fprintf(stderr,
+ "InnoDB: Error: pthread_attr_init() returned %d\n",
+ ret);
+ abort();
+ }
#endif
#ifdef UNIV_AIX
@@ -159,7 +165,7 @@ os_thread_create_func(
fprintf(stderr,
"InnoDB: Error: pthread_attr_setstacksize"
" returned %d\n", ret);
- exit(1);
+ abort();
}
#endif
os_mutex_enter(os_sync_mutex);
@@ -171,7 +177,11 @@ os_thread_create_func(
#else
ret = pthread_create(&pthread, &attr, func, arg);
#endif
- ut_a(ret == 0);
+ if (UNIV_UNLIKELY(ret)) {
+ fprintf(stderr,
+ "InnoDB: Error: pthread_create() returned %d\n", ret);
+ abort();
+ }
#ifndef UNIV_HPUX10
pthread_attr_destroy(&attr);