+2004-03-03 Ken Raeburn <raeburn@mit.edu>
+
+ * rc_base.c: Delete unused and untested semaphore support.
+
2003-08-26 Ken Raeburn <raeburn@mit.edu>
* rc_dfl.c (alive): Take a timestamp argument instead of the
rc_base.c:
-If SEMAPHORE is defined and <semaphore.h> exists when rc_base.c is
-compiled, all access to the type list will be protected by appropriate
-semaphore ups and downs. This is untested.
-
It doesn't take linker magic to preregister types. Just change the
typehead initialization in rc_base.c, with an appropriate include file
setting the ops.
* Base "glue" functions for the replay cache.
*/
-#ifdef SEMAPHORE
-#include <semaphore.h>
-#endif
#include "rc_base.h"
#define FREE(x) ((void) free((char *) (x)))
static struct krb5_rc_typelist krb5_rc_typelist_dfl = { &krb5_rc_dfl_ops, 0 };
static struct krb5_rc_typelist *typehead = &krb5_rc_typelist_dfl;
-#ifdef SEMAPHORE
-semaphore ex_typelist = 1;
-#endif
-
krb5_error_code krb5_rc_register_type(krb5_context context,
const krb5_rc_ops *ops)
{
struct krb5_rc_typelist *t;
-#ifdef SEMAPHORE
- down(&ex_typelist);
-#endif
for (t = typehead;t && strcmp(t->ops->type,ops->type);t = t->next)
;
-#ifdef SEMAPHORE
- up(&ex_typelist);
-#endif
if (t)
return KRB5_RC_TYPE_EXISTS;
if (!(t = (struct krb5_rc_typelist *) malloc(sizeof(struct krb5_rc_typelist))))
return KRB5_RC_MALLOC;
-#ifdef SEMAPHORE
- down(&ex_typelist);
-#endif
t->next = typehead;
t->ops = ops;
typehead = t;
-#ifdef SEMAPHORE
- up(&ex_typelist);
-#endif
return 0;
}
krb5_error_code krb5_rc_resolve_type(krb5_context context, krb5_rcache *id, char *type)
{
struct krb5_rc_typelist *t;
-#ifdef SEMAPHORE
- down(&ex_typelist);
-#endif
for (t = typehead;t && strcmp(t->ops->type,type);t = t->next)
;
-#ifdef SEMAPHORE
- up(&ex_typelist);
-#endif
if (!t)
return KRB5_RC_TYPE_NOTFOUND;
/* allocate *id? nah */