Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/src/runtime/Kernel/stableptr.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#ifndef _STABLEPTR_H
#define _STABLEPTR_H

typedef void* StablePtr;

extern  StablePtr      makeStablePtr  (unsigned long*);
extern  unsigned long *derefStablePtr (StablePtr);
extern  void           freeStablePtr  (StablePtr);
extern  void           copyStablePtr  (StablePtr,StablePtr);
extern  void           stableInit     (void);

/* for backwards compatibility: */
typedef StablePtr HaskellRef;
#define stableRef(x)		derefStablePtr(x)
#define stableInsert(x)		makeStablePtr(x)
#define stableRelease(x)	freeStablePtr(x)
#define stableCopy(x,y)		copyStablePtr(x)

#endif

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.