OSSP CVS Repository

ossp - Difference in ossp-pkg/pth/pth_attr.c versions 1.16 and 1.17
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/pth/pth_attr.c 1.16 -> 1.17

--- pth_attr.c   2002/01/27 11:03:40     1.16
+++ pth_attr.c   2002/10/24 15:21:13     1.17
@@ -51,9 +51,9 @@
     pth_attr_t a;
 
     if (t == NULL)
-        return_errno(FALSE, EINVAL);
+        return pth_error((pth_attr_t)NULL, EINVAL);
     if ((a = (pth_attr_t)malloc(sizeof(struct pth_attr_st))) == NULL)
-        return_errno(NULL, ENOMEM);
+        return pth_error((pth_attr_t)NULL, ENOMEM);
     a->a_tid = t;
     return a;
 }
@@ -63,7 +63,7 @@
     pth_attr_t a;
 
     if ((a = (pth_attr_t)malloc(sizeof(struct pth_attr_st))) == NULL)
-        return_errno(NULL, ENOMEM);
+        return pth_error((pth_attr_t)NULL, ENOMEM);
     a->a_tid = NULL;
     pth_attr_init(a);
     return a;
@@ -72,7 +72,7 @@
 int pth_attr_destroy(pth_attr_t a)
 {
     if (a == NULL)
-        return_errno(FALSE, EINVAL);
+        return pth_error(FALSE, EINVAL);
     free(a);
     return TRUE;
 }
@@ -80,9 +80,9 @@
 int pth_attr_init(pth_attr_t a)
 {
     if (a == NULL)
-        return_errno(FALSE, EINVAL);
+        return pth_error(FALSE, EINVAL);
     if (a->a_tid != NULL)
-        return_errno(FALSE, EPERM);
+        return pth_error(FALSE, EPERM);
     a->a_prio = PTH_PRIO_STD;
     pth_util_cpystrn(a->a_name, "unknown", PTH_TCB_NAMELEN);
     a->a_joinable = TRUE;
@@ -117,7 +117,7 @@
 intern int pth_attr_ctrl(int cmd, pth_attr_t a, int op, va_list ap)
 {
     if (a == NULL)
-        return_errno(FALSE, EINVAL);
+        return pth_error(FALSE, EINVAL);
     switch (op) {
         case PTH_ATTR_PRIO: {
             /* priority */
@@ -182,7 +182,7 @@
             unsigned int val, *src, *dst;
             if (cmd == PTH_ATTR_SET) {
                 if (a->a_tid != NULL)
-                    return_errno(FALSE, EPERM);
+                    return pth_error(FALSE, EPERM);
                 src = &val; val = va_arg(ap, unsigned int);
                 dst = &a->a_stacksize;
             }
@@ -198,7 +198,7 @@
             char *val, **src, **dst;
             if (cmd == PTH_ATTR_SET) {
                 if (a->a_tid != NULL)
-                    return_errno(FALSE, EPERM);
+                    return pth_error(FALSE, EPERM);
                 src = &val; val = va_arg(ap, char *);
                 dst = &a->a_stackaddr;
             }
@@ -212,7 +212,7 @@
         case PTH_ATTR_TIME_SPAWN: {
             pth_time_t *dst;
             if (cmd == PTH_ATTR_SET)
-                return_errno(FALSE, EPERM);
+                return pth_error(FALSE, EPERM);
             dst = va_arg(ap, pth_time_t *);
             if (a->a_tid != NULL)
                 pth_time_set(dst, &a->a_tid->spawned);
@@ -223,7 +223,7 @@
         case PTH_ATTR_TIME_LAST: {
             pth_time_t *dst;
             if (cmd == PTH_ATTR_SET)
-                return_errno(FALSE, EPERM);
+                return pth_error(FALSE, EPERM);
             dst = va_arg(ap, pth_time_t *);
             if (a->a_tid != NULL)
                 pth_time_set(dst, &a->a_tid->lastran);
@@ -234,7 +234,7 @@
         case PTH_ATTR_TIME_RAN: {
             pth_time_t *dst;
             if (cmd == PTH_ATTR_SET)
-                return_errno(FALSE, EPERM);
+                return pth_error(FALSE, EPERM);
             dst = va_arg(ap, pth_time_t *);
             if (a->a_tid != NULL)
                 pth_time_set(dst, &a->a_tid->running);
@@ -245,9 +245,9 @@
         case PTH_ATTR_START_FUNC: {
             void *(**dst)(void *);
             if (cmd == PTH_ATTR_SET)
-                return_errno(FALSE, EPERM);
+                return pth_error(FALSE, EPERM);
             if (a->a_tid == NULL)
-                return_errno(FALSE, EACCES);
+                return pth_error(FALSE, EACCES);
             dst = (void *(**)(void *))va_arg(ap, void *);
             *dst = a->a_tid->start_func;
             break;
@@ -255,9 +255,9 @@
         case PTH_ATTR_START_ARG: {
             void **dst;
             if (cmd == PTH_ATTR_SET)
-                return_errno(FALSE, EPERM);
+                return pth_error(FALSE, EPERM);
             if (a->a_tid == NULL)
-                return_errno(FALSE, EACCES);
+                return pth_error(FALSE, EACCES);
             dst = va_arg(ap, void **);
             *dst = a->a_tid->start_arg;
             break;
@@ -265,9 +265,9 @@
         case PTH_ATTR_STATE: {
             pth_state_t *dst;
             if (cmd == PTH_ATTR_SET)
-                return_errno(FALSE, EPERM);
+                return pth_error(FALSE, EPERM);
             if (a->a_tid == NULL)
-                return_errno(FALSE, EACCES);
+                return pth_error(FALSE, EACCES);
             dst = va_arg(ap, pth_state_t *);
             *dst = a->a_tid->state;
             break;
@@ -275,9 +275,9 @@
         case PTH_ATTR_EVENTS: {
             pth_event_t *dst;
             if (cmd == PTH_ATTR_SET)
-                return_errno(FALSE, EPERM);
+                return pth_error(FALSE, EPERM);
             if (a->a_tid == NULL)
-                return_errno(FALSE, EACCES);
+                return pth_error(FALSE, EACCES);
             dst = va_arg(ap, pth_event_t *);
             *dst = a->a_tid->events;
             break;
@@ -285,13 +285,13 @@
         case PTH_ATTR_BOUND: {
             int *dst;
             if (cmd == PTH_ATTR_SET)
-                return_errno(FALSE, EPERM);
+                return pth_error(FALSE, EPERM);
             dst = va_arg(ap, int *);
             *dst = (a->a_tid != NULL ? TRUE : FALSE);
             break;
         }
         default:
-            return_errno(FALSE, EINVAL);
+            return pth_error(FALSE, EINVAL);
     }
     return TRUE;
 }

CVSTrac 2.0.1