|
From: Foster B. <fos...@us...> - 2005-04-14 00:26:39
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1496/adobe-source/adobe/source Modified Files: xstr.cpp Log Message: more metrics work on the mac Index: xstr.cpp =================================================================== RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/source/xstr.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** xstr.cpp 13 Apr 2005 16:21:15 -0000 1.6 --- xstr.cpp 14 Apr 2005 00:26:31 -0000 1.7 *************** *** 204,208 **** /*************************************************************************************************/ ! struct str_less_t { bool operator () (const adobe::name_t& x, const adobe::name_t& y) const --- 204,208 ---- /*************************************************************************************************/ ! struct name_less_t { bool operator () (const adobe::name_t& x, const adobe::name_t& y) const *************** *** 244,248 **** /*************************************************************************************************/ ! typedef std::multimap<adobe::name_t, node_t, str_less_t> store_t; typedef store_t::iterator store_iterator; typedef store_t::value_type store_value_type; --- 244,248 ---- /*************************************************************************************************/ ! typedef std::multimap<adobe::name_t, node_t, name_less_t> store_t; typedef store_t::iterator store_iterator; typedef store_t::value_type store_value_type; *************** *** 449,456 **** throw std::runtime_error("xstr: id missing"); ! // NOTE (fbrereto) : This has been commented out because copy_to_xstr_store is the only // function that accesses this function. We are interested in grabbing // the mutex only once to make this the fastest group add possible, so ! // we grab the mutex in copy_to_xstr_store instead of here. If you decide // to change this function's relationship to the rest of this code, make // sure you know what you are doing, lest you introduce a threading issue. --- 449,456 ---- throw std::runtime_error("xstr: id missing"); ! // NOTE (fbrereto) : This has been commented out because fill_glossary is the only // function that accesses this function. We are interested in grabbing // the mutex only once to make this the fastest group add possible, so ! // we grab the mutex in fill_glossary instead of here. If you decide // to change this function's relationship to the rest of this code, make // sure you know what you are doing, lest you introduce a threading issue. *************** *** 860,865 **** x.attribute_value(attribute_id, id); - ADOBE_GLOBAL_MUTEX_INSTANCE(xstr_store); - xstr_store(id, x); } --- 860,863 ---- *************** *** 902,905 **** --- 900,905 ---- xstr_parser(node_set).do_parse(parse_range); + ADOBE_GLOBAL_MUTEX_INSTANCE(xstr_store); + adobe::for_each(node_set, copy_to_xstr_store); } |