diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2002-12-20 22:38:04 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2002-12-20 22:38:04 +0000 |
| commit | 7c28091d5daeb6431e6e76aeeca9ba1d33665d66 (patch) | |
| tree | be6b961a9753ec8941509c03fa7c16fbbeabf4d9 /src/kadmin/testing/scripts | |
| parent | 100ac673adeb87a48fa1deb2cff348af36a1c103 (diff) | |
| download | krb5-7c28091d5daeb6431e6e76aeeca9ba1d33665d66.tar.gz krb5-7c28091d5daeb6431e6e76aeeca9ba1d33665d66.tar.xz krb5-7c28091d5daeb6431e6e76aeeca9ba1d33665d66.zip | |
Merge in data tree sharing, minus locking support, plus a bugfix or two
* prof_int.h (SHARE_TREE_DATA): Define.
(struct _prf_file_t) [SHARE_TREE_DATA]: Make data field a pointer rather than
an array.
(struct global_shared_profile_data): New type, for profile library global
data.
(krb5int_profile_shared_data): Declare new variable.
(g_shared_trees): New macro, refers to a field in the global data.
(PROFILE_FILE_SHARED): New flag macro.
* prof_file.c (krb5int_profile_shared_data): Initialize here.
(profile_open_file) [SHARE_TREE_DATA]: Scan g_shared_trees for an entry with
the same filename. If found, increment its reference count, update it, and
return it; otherwise, allocate a new one, and add it to the list after filling
it in.
(profile_dereference_data): New function. Decrement reference count if
SHARE_TREE_DATA, and free the data if appropriate.
(profile_free_file): Call profile_dereference_data.
(profile_free_file_data) [SHARE_TREE_DATA]: If the SHARED flag is set, remove
it from the g_shared_trees list before freeing. Free up the allocated space.
* prof_set.c (rw_setup) [SHARE_TREE_DATA]: If the object's data is shared, copy
it into a new data structure not in the global shared list, and dereference the
old one.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15060 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/testing/scripts')
0 files changed, 0 insertions, 0 deletions
