1/* 2 * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 31 unchanged lines hidden (view full) --- 40int 41pthread_condattr_init(pthread_condattr_t *attr) 42{ 43 int ret; 44 pthread_condattr_t pattr; 45 46 if ((pattr = (pthread_condattr_t) 47 malloc(sizeof(struct pthread_cond_attr))) == NULL) { |
48 ret = ENOMEM; |
49 } else { 50 memcpy(pattr, &pthread_condattr_default, 51 sizeof(struct pthread_cond_attr)); 52 *attr = pattr; 53 ret = 0; 54 } 55 return(ret); 56} 57#endif |