VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /usr/GNUstep/Local/Library/Headers/objc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/GNUstep/Local/Library/Headers/objc/slot.h
#if defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
#pragma clang system_header
#endif

#ifndef __OBJC_SLOT_H_INCLUDED__
#define __OBJC_SLOT_H_INCLUDED__
/**
 * The objc_slot structure is used to permit safe IMP caching.  It is returned
 * by the new lookup APIs.  When you cache an IMP, you should store a copy of
 * the version field and a pointer to the slot. 
 *
 * The slot version is guaranteed never to be 0.  When updating a cache, you
 * should use code of the following form:
 *
 * 1) version = 0;
 * 2) slot->cachedFor = receiver->isa;
 * 3) slot_cache = slot;
 * 4) version = slot->version;
 *
 * The runtime guarantees that the version in any cachable slot will never be
 * 0.  This should ensure that, if the version and cache pointer mismatch, the
 * next access will cause a cache miss.  
 *
 * When using a cached slot, you should compare the owner pointer to the isa
 * pointer of the receiver and the message and the version of the slot to your
 * cached version.
 */
struct objc_slot
{
	/** The class to which this slot is attached (used internally).  */
	Class owner;
	/** The class for which this slot was cached.  Note that this can be
	 * modified by different cache owners, in different threads.  Doing so may
	 * cause some cache misses, but if different methods are sending messages
	 * to the same object and sharing a cached slot then it may also improve
	 * cache hits.  Profiling is probably required here. */
	Class cachedFor;
	/** The (typed) selector for the method identified by this slot. */
	const char *types;
	/** The current version.  This changes if the method changes or if a
	 * subclass overrides this method, potentially invalidating this cache. */
	int version;
	/** The method pointer for this method. */
	IMP method;
	/** Selector for this method. */
	SEL selector;
} OBJC_NONPORTABLE;
#endif // __OBJC_SLOT_H_INCLUDED__

VaKeR 2022