15,915,336 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by tuccio (Top 8 by date)
tuccio
24-May-11 7:54am
View
well i made the assumption that no one is going to grab the lock, because i've a std::map containing locks and i access this map in mutual exclusion, so, while i've the lock on the map, no one is going to grab it, because no one can access it (i know this sounds weird and inefficient, but it's the easiest solution i've found, and i've not requirements of efficience)
of course this map mutual exclusion implies no one can access waiting variabile, so this is a kind of interlocked increment too
my point is that i've this std::map<ino_t,> to lock files on a thread base, i add locks to this map when i request lock for the file, but i need a condition to remove them safely, to avoid the map being full of useless locks
tuccio
3-Apr-11 9:20am
View
you should ask my professor :D
i see you're italian, so i just paste: "Non e' consentito cioe' accesso ne' in lettura ne' in scrittura da parte di altre istanze del server tftp allo stesso file mentre il file viene scritto."
i'm expressly required to do so :/
tuccio
2-Apr-11 17:13pm
View
because i'm expressly required not to allow multiple server instances to access the same files when one of them is writing
maybe i could find a way to combine flock and rwlocks safely
tuccio
2-Apr-11 12:32pm
View
ok, i've been told i should use an allocator, but that looks complicated to be honest
tuccio
2-Apr-11 7:10am
View
well.. how? i mean, and how can i be sure that no memory will be allocated out of my data segment? i guess that any "new" would be a problem, isn't it?
tuccio
1-Apr-11 19:15pm
View
Well, maybe i could do this, but i was wondering.. can i allocate a std::map on a shared memory segment i get with shmget, or i need to implement my own data structure?
tuccio
1-Apr-11 19:13pm
View
Deleted
i was wondering.. can i allocate a std::map on a shared memory segment or i have to make my own data structure?
tuccio
1-Apr-11 16:15pm
View
pthread's rwlocks and mutexes require processes to share memory in order to work, that doesn't look simple to be honest
also that would require me to identify files on the filesystem, and mapping them with their own rwlock.. so i'd need a data structure to manage these locks, wouldn't i? or maybe i'm making it too complicated?
Show More