diff options
author | 5 <NotZed@Ximian.com> | 2001-09-26 06:09:04 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-09-26 06:09:04 +0800 |
commit | c753a2a3d836b70fdfe96c456e383388fa4f3e2a (patch) | |
tree | c9208da6180f7cc581efd9ad6fd1ee0fc6ae519d /camel/camel-operation.h | |
parent | 769e117e901dce718915b863209fc58c218ca3c6 (diff) | |
download | gsoc2013-evolution-c753a2a3d836b70fdfe96c456e383388fa4f3e2a.tar.gz gsoc2013-evolution-c753a2a3d836b70fdfe96c456e383388fa4f3e2a.tar.zst gsoc2013-evolution-c753a2a3d836b70fdfe96c456e383388fa4f3e2a.zip |
Fix for !threads enabled not ccompiling. (camel_operation_ref): Assert
2001-09-25 <NotZed@Ximian.com>
* camel-operation.c (camel_operation_unref): Fix for !threads
enabled not ccompiling.
(camel_operation_ref): Assert refcount > 0.
(struct _CamelOperation): Removed the lock. On further
investigation, I dont think this will always work, the
registration operations assume that a lookup in the
operation_active table will return a ref, that will remain valid
until we ref it, which needn't be the case. So now i'm using a
single global lock, since we'd need to do that for unref anyway,
and every operation is fast & memory-bound. Changed all the code
to handle this.
(camel_operation_progress_count): Since the code is identical,
just call progress() for now.
(camel_operation_register): No longer refcount, use unref to
check/clear the active table.
(camel_operation_unregister): Same here.
(camel_operation_unref): Check if operation is in active table, if
so, warn, remove.
svn path=/trunk/; revision=13125
Diffstat (limited to 'camel/camel-operation.h')
-rw-r--r-- | camel/camel-operation.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/camel/camel-operation.h b/camel/camel-operation.h index 9dab0b0377..25bd77e408 100644 --- a/camel/camel-operation.h +++ b/camel/camel-operation.h @@ -53,6 +53,8 @@ void camel_operation_cancel_block(CamelOperation *cc); void camel_operation_cancel_unblock(CamelOperation *cc); int camel_operation_cancel_check(CamelOperation *cc); int camel_operation_cancel_fd(CamelOperation *cc); +/* return the registered operation for this thread, if there is one */ +CamelOperation *camel_operation_registered(void); void camel_operation_start(CamelOperation *cc, char *what, ...); void camel_operation_start_transient(CamelOperation *cc, char *what, ...); |