This could reduce CPU usage due to better branch prediction.
const void *data, void **sync_context);
void mail_cache_set_syscall_error(struct mail_cache *cache,
- const char *function);
+ const char *function) ATTR_COLD;
#endif
/* "Error in index cache file %s: ...". */
void mail_cache_set_corrupted(struct mail_cache *cache, const char *fmt, ...)
- ATTR_FORMAT(2, 3);
+ ATTR_FORMAT(2, 3) ATTR_COLD;
void mail_cache_set_seq_corrupted_reason(struct mail_cache_view *cache_view,
- uint32_t seq, const char *reason);
+ uint32_t seq, const char *reason)
+ ATTR_COLD;
/* Returns human-readable reason for why a cached field is missing for
the specified mail. This is mainly for debugging purposes, so the exact
/* Log an error and set it as the index's current error that is available
with mail_index_get_error_message(). */
void mail_index_set_error(struct mail_index *index, const char *fmt, ...)
- ATTR_FORMAT(2, 3);
+ ATTR_FORMAT(2, 3) ATTR_COLD;
/* Same as mail_index_set_error(), but don't log the error. */
-void mail_index_set_error_nolog(struct mail_index *index, const char *str);
+void mail_index_set_error_nolog(struct mail_index *index, const char *str)
+ ATTR_COLD;
/* "%s failed with index file %s: %m" */
void mail_index_set_syscall_error(struct mail_index *index,
- const char *function);
+ const char *function) ATTR_COLD;
/* "%s failed with file %s: %m" */
void mail_index_file_set_syscall_error(struct mail_index *index,
const char *filepath,
- const char *function);
+ const char *function) ATTR_COLD;
#endif
const ARRAY_TYPE(mail_index_strmap_rec) **recs_r,
const struct hash2_table **hash_r);
void mail_index_strmap_view_close(struct mail_index_strmap_view **view);
-void mail_index_strmap_view_set_corrupted(struct mail_index_strmap_view *view);
+void mail_index_strmap_view_set_corrupted(struct mail_index_strmap_view *view)
+ ATTR_COLD;
/* Return the highest used string index. */
uint32_t mail_index_strmap_view_get_highest_idx(struct mail_index_strmap_view *view);
const struct mail_transaction_keyword_reset *r);
void mail_index_sync_set_corrupted(struct mail_index_sync_map_ctx *ctx,
- const char *fmt, ...) ATTR_FORMAT(2, 3);
+ const char *fmt, ...)
+ ATTR_FORMAT(2, 3) ATTR_COLD;
#ifdef DEBUG
void mail_index_map_check(struct mail_index_map *map);
/* Mark index file corrupted in memory and delete it from disk.
Invalidates all views. This should be called only for index files that can
safely be recreated without any data loss. */
-void mail_index_mark_corrupted(struct mail_index *index);
+void mail_index_mark_corrupted(struct mail_index *index) ATTR_COLD;
/* Check and fix any found problems. Returns -1 if we couldn't lock for sync,
0 if everything went ok. */
-int mail_index_fsck(struct mail_index *index);
+int mail_index_fsck(struct mail_index *index) ATTR_COLD;
/* Returns TRUE if mail_index_fsck() has been called since the last
mail_index_reset_fscked() call. */
bool mail_index_reset_fscked(struct mail_index *index);
void
mail_transaction_log_file_set_corrupted(struct mail_transaction_log_file *file,
const char *fmt, ...)
- ATTR_FORMAT(2, 3);
+ ATTR_FORMAT(2, 3) ATTR_COLD;
void mail_transaction_log_get_dotlock_set(struct mail_transaction_log *log,
struct dotlock_settings *set_r);
void
mail_transaction_log_view_set_corrupted(struct mail_transaction_log_view *view,
const char *fmt, ...)
- ATTR_FORMAT(2, 3);
+ ATTR_FORMAT(2, 3) ATTR_COLD;
bool
mail_transaction_log_view_is_corrupted(struct mail_transaction_log_view *view);