diff --git a/libc/pthread/Make.defs b/libc/pthread/Make.defs index 44a2d8b2d63..0d783c07fd2 100644 --- a/libc/pthread/Make.defs +++ b/libc/pthread/Make.defs @@ -35,23 +35,23 @@ # Add the pthread C files to the build -CSRCS += pthread_attrinit.c pthread_attrdestroy.c \ - pthread_attrsetschedpolicy.c pthread_attrgetschedpolicy.c \ - pthread_attrsetinheritsched.c pthread_attrgetinheritsched.c \ - pthread_attrsetstacksize.c pthread_attrgetstacksize.c \ - pthread_attrsetschedparam.c pthread_attrgetschedparam.c \ - pthread_barrierattrinit.c pthread_barrierattrdestroy.c \ - pthread_barrierattrgetpshared.c pthread_barrierattrsetpshared.c \ - pthread_condattrinit.c pthread_condattrdestroy.c \ - pthread_mutexattrinit.c pthread_mutexattrdestroy.c \ - pthread_mutexattrgetpshared.c pthread_mutexattrsetpshared.c +CSRCS += pthread_attr_init.c pthread_attr_destroy.c \ + pthread_attr_setschedpolicy.c pthread_attr_getschedpolicy.c \ + pthread_attr_setinheritsched.c pthread_attr_getinheritsched.c \ + pthread_attr_setstacksize.c pthread_attr_getstacksize.c \ + pthread_attr_setschedparam.c pthread_attr_getschedparam.c \ + pthread_barrierattr_init.c pthread_barrierattr_destroy.c \ + pthread_barrierattr_getpshared.c pthread_barrierattr_setpshared.c \ + pthread_condattr_init.c pthread_condattr_destroy.c \ + pthread_mutexattr_init.c pthread_mutexattr_destroy.c \ + pthread_mutexattr_getpshared.c pthread_mutexattr_setpshared.c ifeq ($(CONFIG_SMP),y) -CSRCS += pthread_attrgetaffinity.c pthread_attrsetaffinity.c +CSRCS += pthread_attr_getaffinity.c pthread_attr_setaffinity.c endif ifeq ($(CONFIG_MUTEX_TYPES),y) -CSRCS += pthread_mutexattrsettype.c pthread_mutexattrgettype.c +CSRCS += pthread_mutexattr_settype.c pthread_mutexattr_gettype.c endif ifeq ($(CONFIG_BUILD_PROTECTED),y) diff --git a/libc/pthread/pthread_attrdestroy.c b/libc/pthread/pthread_attr_destroy.c similarity index 98% rename from libc/pthread/pthread_attrdestroy.c rename to libc/pthread/pthread_attr_destroy.c index 7dc431f8085..084946cf725 100644 --- a/libc/pthread/pthread_attrdestroy.c +++ b/libc/pthread/pthread_attr_destroy.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrdestroy.c + * libc/pthread/pthread_attr_destroy.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrgetaffinity.c b/libc/pthread/pthread_attr_getaffinity.c similarity index 98% rename from libc/pthread/pthread_attrgetaffinity.c rename to libc/pthread/pthread_attr_getaffinity.c index a08f18cb001..706f059ec53 100644 --- a/libc/pthread/pthread_attrgetaffinity.c +++ b/libc/pthread/pthread_attr_getaffinity.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrgetaffinity.c + * libc/pthread/pthread_attr_getaffinity.c * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrgetinheritsched.c b/libc/pthread/pthread_attr_getinheritsched.c similarity index 98% rename from libc/pthread/pthread_attrgetinheritsched.c rename to libc/pthread/pthread_attr_getinheritsched.c index 0f6b42a879b..0760c5e2659 100644 --- a/libc/pthread/pthread_attrgetinheritsched.c +++ b/libc/pthread/pthread_attr_getinheritsched.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrgetinheritsched.c + * libc/pthread/pthread_attr_getinheritsched.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrgetschedparam.c b/libc/pthread/pthread_attr_getschedparam.c similarity index 98% rename from libc/pthread/pthread_attrgetschedparam.c rename to libc/pthread/pthread_attr_getschedparam.c index beea2a595bf..d3280ffde3e 100644 --- a/libc/pthread/pthread_attrgetschedparam.c +++ b/libc/pthread/pthread_attr_getschedparam.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrgetschedparam.c + * libc/pthread/pthread_attr_getschedparam.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrgetschedpolicy.c b/libc/pthread/pthread_attr_getschedpolicy.c similarity index 98% rename from libc/pthread/pthread_attrgetschedpolicy.c rename to libc/pthread/pthread_attr_getschedpolicy.c index 601b3cebeaf..f4f624f4f0b 100644 --- a/libc/pthread/pthread_attrgetschedpolicy.c +++ b/libc/pthread/pthread_attr_getschedpolicy.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrgetschedpolicy.c + * libc/pthread/pthread_attr_getschedpolicy.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrgetstacksize.c b/libc/pthread/pthread_attr_getstacksize.c similarity index 98% rename from libc/pthread/pthread_attrgetstacksize.c rename to libc/pthread/pthread_attr_getstacksize.c index 130bed7fb66..15de1b38f9e 100644 --- a/libc/pthread/pthread_attrgetstacksize.c +++ b/libc/pthread/pthread_attr_getstacksize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrgetstacksize.c + * libc/pthread/pthread_attr_getstacksize.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrinit.c b/libc/pthread/pthread_attr_init.c similarity index 99% rename from libc/pthread/pthread_attrinit.c rename to libc/pthread/pthread_attr_init.c index 1d303a05f02..b6c7c39ed60 100644 --- a/libc/pthread/pthread_attrinit.c +++ b/libc/pthread/pthread_attr_init.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrinit.c + * libc/pthread/pthread_attr_init.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrsetaffinity.c b/libc/pthread/pthread_attr_setaffinity.c similarity index 98% rename from libc/pthread/pthread_attrsetaffinity.c rename to libc/pthread/pthread_attr_setaffinity.c index c8e7c3607df..6705e87aa0f 100644 --- a/libc/pthread/pthread_attrsetaffinity.c +++ b/libc/pthread/pthread_attr_setaffinity.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrsetaffinity.c + * libc/pthread/pthread_attr_setaffinity.c * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrsetinheritsched.c b/libc/pthread/pthread_attr_setinheritsched.c similarity index 98% rename from libc/pthread/pthread_attrsetinheritsched.c rename to libc/pthread/pthread_attr_setinheritsched.c index 89d29d07bbf..c61be6f4f62 100644 --- a/libc/pthread/pthread_attrsetinheritsched.c +++ b/libc/pthread/pthread_attr_setinheritsched.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrsetinheritsched.c + * libc/pthread/pthread_attr_setinheritsched.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrsetschedparam.c b/libc/pthread/pthread_attr_setschedparam.c similarity index 98% rename from libc/pthread/pthread_attrsetschedparam.c rename to libc/pthread/pthread_attr_setschedparam.c index 602f76eafaf..b37d3aad277 100644 --- a/libc/pthread/pthread_attrsetschedparam.c +++ b/libc/pthread/pthread_attr_setschedparam.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrsetschedparam.c + * libc/pthread/pthread_attr_setschedparam.c * * Copyright (C) 2007-2009, 2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrsetschedpolicy.c b/libc/pthread/pthread_attr_setschedpolicy.c similarity index 98% rename from libc/pthread/pthread_attrsetschedpolicy.c rename to libc/pthread/pthread_attr_setschedpolicy.c index 2aa26861578..75a58e105b9 100644 --- a/libc/pthread/pthread_attrsetschedpolicy.c +++ b/libc/pthread/pthread_attr_setschedpolicy.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrsetschedpolicy.c + * libc/pthread/pthread_attr_setschedpolicy.c * * Copyright (C) 2007-2009, 2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_attrsetstacksize.c b/libc/pthread/pthread_attr_setstacksize.c similarity index 98% rename from libc/pthread/pthread_attrsetstacksize.c rename to libc/pthread/pthread_attr_setstacksize.c index 3ed309981cf..0501f76aa62 100644 --- a/libc/pthread/pthread_attrsetstacksize.c +++ b/libc/pthread/pthread_attr_setstacksize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_attrsetstacksize.c + * libc/pthread/pthread_attr_setstacksize.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_barrierattrdestroy.c b/libc/pthread/pthread_barrierattr_destroy.c similarity index 98% rename from libc/pthread/pthread_barrierattrdestroy.c rename to libc/pthread/pthread_barrierattr_destroy.c index 98342e28c15..7ab23b7b84e 100644 --- a/libc/pthread/pthread_barrierattrdestroy.c +++ b/libc/pthread/pthread_barrierattr_destroy.c @@ -1,5 +1,5 @@ /******************************************************************************** - * libc/pthread/pthread_barrierattrdestroy.c + * libc/pthread/pthread_barrierattr_destroy.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_barrierattrgetpshared.c b/libc/pthread/pthread_barrierattr_getpshared.c similarity index 98% rename from libc/pthread/pthread_barrierattrgetpshared.c rename to libc/pthread/pthread_barrierattr_getpshared.c index ce186f230ab..d74d54dcbf3 100644 --- a/libc/pthread/pthread_barrierattrgetpshared.c +++ b/libc/pthread/pthread_barrierattr_getpshared.c @@ -1,5 +1,5 @@ /******************************************************************************** - * libc/pthread/pthread_barrierattrgetpshared.c + * libc/pthread/pthread_barrierattr_getpshared.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_barrierattrinit.c b/libc/pthread/pthread_barrierattr_init.c similarity index 98% rename from libc/pthread/pthread_barrierattrinit.c rename to libc/pthread/pthread_barrierattr_init.c index 16c31922d79..9b3f5775523 100644 --- a/libc/pthread/pthread_barrierattrinit.c +++ b/libc/pthread/pthread_barrierattr_init.c @@ -1,5 +1,5 @@ /******************************************************************************** - * libc/pthread/pthread_barrierattrinit.c + * libc/pthread/pthread_barrierattr_init.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_barrierattrsetpshared.c b/libc/pthread/pthread_barrierattr_setpshared.c similarity index 98% rename from libc/pthread/pthread_barrierattrsetpshared.c rename to libc/pthread/pthread_barrierattr_setpshared.c index 6839511df56..1736a4e4309 100644 --- a/libc/pthread/pthread_barrierattrsetpshared.c +++ b/libc/pthread/pthread_barrierattr_setpshared.c @@ -1,5 +1,5 @@ /******************************************************************************** - * libc/pthread/pthread_barrierattrsetpshared.c + * libc/pthread/pthread_barrierattr_setpshared.c * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_condattrdestroy.c b/libc/pthread/pthread_condattr_destroy.c similarity index 98% rename from libc/pthread/pthread_condattrdestroy.c rename to libc/pthread/pthread_condattr_destroy.c index d538891f82b..5833de44cf3 100644 --- a/libc/pthread/pthread_condattrdestroy.c +++ b/libc/pthread/pthread_condattr_destroy.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_condattrdestroy.c + * libc/pthread/pthread_condattr_destroy.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_condattrinit.c b/libc/pthread/pthread_condattr_init.c similarity index 98% rename from libc/pthread/pthread_condattrinit.c rename to libc/pthread/pthread_condattr_init.c index 64d2d0ac250..7f5602ce761 100644 --- a/libc/pthread/pthread_condattrinit.c +++ b/libc/pthread/pthread_condattr_init.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_condattrinit.c + * libc/pthread/pthread_condattr_init.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_mutexattrdestroy.c b/libc/pthread/pthread_mutexattr_destroy.c similarity index 98% rename from libc/pthread/pthread_mutexattrdestroy.c rename to libc/pthread/pthread_mutexattr_destroy.c index c20a67bdf77..a5ada877904 100644 --- a/libc/pthread/pthread_mutexattrdestroy.c +++ b/libc/pthread/pthread_mutexattr_destroy.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_mutexattrdestroy.c + * libc/pthread/pthread_mutexattr_destroy.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_mutexattrgetpshared.c b/libc/pthread/pthread_mutexattr_getpshared.c similarity index 98% rename from libc/pthread/pthread_mutexattrgetpshared.c rename to libc/pthread/pthread_mutexattr_getpshared.c index b8f0b77ec45..51e515cbbb6 100644 --- a/libc/pthread/pthread_mutexattrgetpshared.c +++ b/libc/pthread/pthread_mutexattr_getpshared.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_mutexattrgetpshared.c + * libc/pthread/pthread_mutexattr_getpshared.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_mutexattrgettype.c b/libc/pthread/pthread_mutexattr_gettype.c similarity index 98% rename from libc/pthread/pthread_mutexattrgettype.c rename to libc/pthread/pthread_mutexattr_gettype.c index cc553c83509..c9703f5c014 100644 --- a/libc/pthread/pthread_mutexattrgettype.c +++ b/libc/pthread/pthread_mutexattr_gettype.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_mutexattrgettype.c + * libc/pthread/pthread_mutexattr_gettype.c * * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -72,6 +72,7 @@ int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type) *type = attr->type; return 0; } + return EINVAL; } diff --git a/libc/pthread/pthread_mutexattrinit.c b/libc/pthread/pthread_mutexattr_init.c similarity index 98% rename from libc/pthread/pthread_mutexattrinit.c rename to libc/pthread/pthread_mutexattr_init.c index 95f5ba8ab81..01c3bb867d1 100644 --- a/libc/pthread/pthread_mutexattrinit.c +++ b/libc/pthread/pthread_mutexattr_init.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_mutexattrinit.c + * libc/pthread/pthread_mutexattr_init.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_mutexattrsetpshared.c b/libc/pthread/pthread_mutexattr_setpshared.c similarity index 98% rename from libc/pthread/pthread_mutexattrsetpshared.c rename to libc/pthread/pthread_mutexattr_setpshared.c index 3418521ee87..22b915c4f0e 100644 --- a/libc/pthread/pthread_mutexattrsetpshared.c +++ b/libc/pthread/pthread_mutexattr_setpshared.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_mutexattrsetpshared.c + * libc/pthread/pthread_mutexattr_setpshared.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/pthread/pthread_mutexattrsettype.c b/libc/pthread/pthread_mutexattr_settype.c similarity index 98% rename from libc/pthread/pthread_mutexattrsettype.c rename to libc/pthread/pthread_mutexattr_settype.c index ef8b2636865..9922a343555 100644 --- a/libc/pthread/pthread_mutexattrsettype.c +++ b/libc/pthread/pthread_mutexattr_settype.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/pthread/pthread_mutexattrsettype.c + * libc/pthread/pthread_mutexattr_settype.c * * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt