Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-22 14:03:55 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-22 14:03:55 +0300
commitcbc4aae06a9b3878b0af68884a75b953e3c8612b (patch)
treea78995019e14771bcca43c51a3f2d27cd9e2110e /source/blender/blenkernel/intern/blender.c
parent00318eaa2eedfd0f1b8af12bd4a7f664b6ef1b89 (diff)
Fix crash rendering grass_wind.blend from regression tests. The real
problem is that where_is_object is being called from multiple threads but is not thread-safe, added a note about this problem, this commit only solves the crash. Also remove the pushdata/popdata mechanism that was being used here, using this kind of system is bound to give problems with threading.
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r--source/blender/blenkernel/intern/blender.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 6181712f1be..226aa82a36a 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -103,76 +103,6 @@ short ENDIAN_ORDER;
char versionstr[48]= "";
-/* ************************************************ */
-/* pushpop facility: to store data temporally, FIFO! */
-
-ListBase ppmain={0, 0};
-
-typedef struct PushPop {
- struct PushPop *next, *prev;
- void *data;
- int len;
-} PushPop;
-
-void pushdata(void *data, int len)
-{
- PushPop *pp;
-
- pp= MEM_mallocN(sizeof(PushPop), "pushpop");
- BLI_addtail(&ppmain, pp);
- pp->data= MEM_mallocN(len, "pushpop");
- pp->len= len;
- memcpy(pp->data, data, len);
-}
-
-void popfirst(void *data)
-{
- PushPop *pp;
-
- pp= ppmain.first;
- if(pp) {
- memcpy(data, pp->data, pp->len);
- BLI_remlink(&ppmain, pp);
- MEM_freeN(pp->data);
- MEM_freeN(pp);
- }
- else printf("error in popfirst\n");
-}
-
-void poplast(void *data)
-{
- PushPop *pp;
-
- pp= ppmain.last;
- if(pp) {
- memcpy(data, pp->data, pp->len);
- BLI_remlink(&ppmain, pp);
- MEM_freeN(pp->data);
- MEM_freeN(pp);
- }
- else printf("error in poplast\n");
-}
-
-void free_pushpop()
-{
- PushPop *pp;
-
- pp= ppmain.first;
- while(pp) {
- BLI_remlink(&ppmain, pp);
- MEM_freeN(pp->data);
- MEM_freeN(pp);
- }
-}
-
-void pushpop_test()
-{
- if(ppmain.first) printf("pushpop not empty\n");
- free_pushpop();
-}
-
-
-
/* ********** free ********** */
/* only to be called on exit blender */