~n-muench/ubuntu/precise/open-vm-tools/open-vm-tools.raring-precise.backport

« back to all changes in this revision

Viewing changes to lib/include/hashTable.h

  • Committer: Package Import Robot
  • Author(s): Nate Muench
  • Date: 2012-01-23 16:09:45 UTC
  • mfrom: (1.4.6) (2.4.26 sid)
  • Revision ID: package-import@ubuntu.com-20120123160945-b6s0r1vkcovucpf3
Tags: 2011.12.20-562307-0ubuntu1
* Merge latest upstream git tag. Fixes building on Precise
  (LP: #898289, LP: #905612)

* Items merged from Debian unstable:
  - debian/control:
    + open-vm-tools recommends open-vm-dkms. (LP: #598933)
    + open-vm-tools now suggests open-vm-toolbox. (LP: #604998)
  (From 2011.08.21-471295-1 release)
  - Updating maintainer and uploaders fields.
  - Removing vcs fields.
  - Removing references to Daniel's old email address.
  - Updating years in copyright file.
  - Updating to standards version 3.9.2.
  - Updating to debhelper version 8.
  - Switching to source format 3.0 (quilt).
  - Removing manual chrpath setting.
  - Removing exclusion from plugins from debhelper shlibs.
  - Rediffing kvers.patch.
  (From 2011.09.23-491607-1 release)
  - Marking binary architecture-dependend packages as linux and kfreebsd
  only.
  - Removing liburiparser-dev from build-depends as upstream dropped
  unity support.
  - Building with libproc-dev on amd64 again.
  - Dropping disabling of dnet support.
  (From 2011.09.23-491607-2 release)
  - Adding doxygen to build-depends for api documentation.
  - Adding libcunit1-dev to build-depends for test suites.
  - Minimizing rules file.
  - Adding open-vm-tools-dev package, containing only the api
    documentation for now.
  (From 2011.09.23-491607-3 release)
  - Sorting overrides in rules alphabetically.
  - Compacting copyright file.
  - Adding udev rule to set timeout for vmware scsi devices
  (From 2011.12.20-562307-1 release)
  - Adding patch to correct typo in upstreams dkms configuration

* Remaining Changes:
  - Remove Stable part of version numbering.
  - debian folder:
    + Re-added open-vm-dkms.postinst & open-vm-dkms.prerm.
      * Allows dkms modules to compile upon installation.
  - debian/control:
    + Re-add open-vm-source and make into a transitional package
      for open-vm-toolbox.
    + Return dependancies that were moved to open-vm-tools back to
      open-vm-toolbox.
  - debian/rules and debian/open-vm-toolbox.lintian-overrides:
    + Make vmware-user-suid-wrapper suid-root
  - debian/rules:
    + Added CFLAGS field with -Wno-deprecated-declarations
      * Will suppress issues with glib 2.31 or later.
    + Add line to copy vmware-xdg-detect-de into place.
    + Install vmware-user.desktop through toolbox package.
  - debian/open-vm-tools.init:
    + Re-add 'modprobe [-r] vmblock'.
    + Add 'modprobe [-r] vmxnet'.
      * Incase it's not loaded during boot.
    + Remove and re-add pcnet32 module
      * Will be done before (remove) and after (readd) vmxnet module
        is added.
      * If vmxnet doesn't exist (aka modules fail to build), pcnet32 can be
        still used for network connectivity.
      * Workaround until a better fix can be done.
  - Re-add gnome-session to debian/local/xautostart.conf
  - Manpages removed (from debian/manpages):
    + vmmemctl.9
    + vmxnet3.9
    + Remove references to manpages that have been removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
 
36
36
typedef struct HashTable HashTable;
 
37
 
37
38
typedef void (*HashTableFreeEntryFn)(void *clientData);
38
 
typedef int (*HashTableForEachCallback)(const char *key, void *value, 
 
39
 
 
40
typedef int (*HashTableForEachCallback)(const char *key,
 
41
                                        void *value, 
39
42
                                        void *clientData);
40
43
 
41
44
#define HASH_STRING_KEY         0       // case-sensitive string key
102
105
Bool
103
106
HashTable_LookupAndDelete(HashTable  *hashTable,
104
107
                          const void *keyStr,
105
 
                          void      **clientData);
 
108
                          void      **clientData);
106
109
 
107
110
void
108
111
HashTable_Clear(HashTable *ht);
125
128
                  HashTableForEachCallback  cb,
126
129
                  void                     *clientData);
127
130
 
 
131
/*
 
132
 * Specialize hash table that uses the callers data structure as its
 
133
 * hash entry as well, the hash key being an address that must be unique.
 
134
 */
 
135
 
 
136
typedef struct PtrHashEntry
 
137
{
 
138
   struct PtrHashEntry  *next;
 
139
   void                 *ptr;
 
140
} PtrHashEntry;
 
141
 
 
142
/*
 
143
 * PTRHASH_CONTAINER - get the struct for this entry (like PtrHashEntry)
 
144
 * @ptr: the &struct PtrHashEntry pointer.
 
145
 * @type:   the type of the struct this is embedded in.
 
146
 * @member: the name of the list struct within the struct.
 
147
 */
 
148
 
 
149
#define PTRHASH_CONTAINER(ptr, type, member) \
 
150
   ((type *)((char *)(ptr) - offsetof(type, member)))
 
151
 
 
152
typedef int (*PtrHashForEachCallback)(PtrHashEntry *entry,
 
153
                                      const void *clientData);
 
154
 
 
155
HashTable *PtrHash_Alloc(uint32 numBuckets);
 
156
 
 
157
void PtrHash_Free(HashTable *hashTable);
 
158
 
 
159
size_t PtrHash_GetNumElements(const HashTable *ht);
 
160
 
 
161
int PtrHash_ForEach(const HashTable *ht,
 
162
                    PtrHashForEachCallback cb,
 
163
                    const void *clientData);
 
164
 
 
165
PtrHashEntry *PtrHash_Lookup(const HashTable *hashTable,
 
166
                             const void *keyPtr);
 
167
 
 
168
PtrHashEntry *PtrHash_LookupAndDelete(HashTable *hashTable,
 
169
                                      const void *keyPtr);
 
170
 
 
171
Bool PtrHash_Insert(HashTable *hashTable,
 
172
                    PtrHashEntry *entry);
 
173
 
 
174
Bool PtrHash_Delete(HashTable *hashTable,
 
175
                    const void *keyPtr);
 
176
 
128
177
#endif