ObjFW  Check-in [5a7c58ec98]

Overview
Comment:Add of_num_cpus.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5a7c58ec98142f85649fbcbfa0d77380e7a3158e04b4313a58985720501a06d5
User & Date: js on 2012-03-13 20:19:34
Other Links: manifest | tags
Context
2012-03-13
20:19
Improve -[OFDictionary isEqual:]. check-in: 50d2bd5dec user: js tags: trunk
20:19
Add of_num_cpus. check-in: 5a7c58ec98 user: js tags: trunk
20:18
Move objc_{set,get}Property() declarations to macros.h. check-in: 92da2a3a5b user: js tags: trunk
Changes

Modified src/OFObject.h from [fd7384f991] to [df231ae667].

605
606
607
608
609
610
611

612
613
614

#import "OFObject+Serialization.h"

#ifdef __cplusplus
extern "C" {
#endif
extern size_t of_pagesize;

#ifdef __cplusplus
}
#endif







>



605
606
607
608
609
610
611
612
613
614
615

#import "OFObject+Serialization.h"

#ifdef __cplusplus
extern "C" {
#endif
extern size_t of_pagesize;
extern size_t of_num_cpus;
#ifdef __cplusplus
}
#endif

Modified src/OFObject.m from [836c79ac97] to [eb1f0d3652].

87
88
89
90
91
92
93

94
95
96
97
98
99
100
} alloc_failed_exception;
static Class autoreleasePool = Nil;

static SEL cxx_construct = NULL;
static SEL cxx_destruct = NULL;

size_t of_pagesize;


#ifdef NEED_OBJC_SYNC_INIT
extern BOOL objc_sync_init();
#endif

#ifdef NEED_OBJC_PROPERTIES_INIT
extern BOOL objc_properties_init();







>







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
} alloc_failed_exception;
static Class autoreleasePool = Nil;

static SEL cxx_construct = NULL;
static SEL cxx_destruct = NULL;

size_t of_pagesize;
size_t of_num_cpus;

#ifdef NEED_OBJC_SYNC_INIT
extern BOOL objc_sync_init();
#endif

#ifdef NEED_OBJC_PROPERTIES_INIT
extern BOOL objc_properties_init();
207
208
209
210
211
212
213

214
215

216
217
218


219
220
221
222
223
224
225
		abort();
	}

#if defined(_WIN32)
	SYSTEM_INFO si;
	GetSystemInfo(&si);
	of_pagesize = si.dwPageSize;

#elif defined(_PSP)
	of_pagesize = 4096;

#else
	if ((of_pagesize = sysconf(_SC_PAGESIZE)) < 1)
		of_pagesize = 4096;


#endif
}

+ (void)initialize
{
}








>


>



>
>







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
		abort();
	}

#if defined(_WIN32)
	SYSTEM_INFO si;
	GetSystemInfo(&si);
	of_pagesize = si.dwPageSize;
	of_num_cpus = si.dwNumberOfProcessors;
#elif defined(_PSP)
	of_pagesize = 4096;
	of_num_cpus = 1;
#else
	if ((of_pagesize = sysconf(_SC_PAGESIZE)) < 1)
		of_pagesize = 4096;
	if ((of_num_cpus = sysconf(_SC_NPROCESSORS_CONF)) < 1)
		of_num_cpus = 1;
#endif
}

+ (void)initialize
{
}